(no title)
nhatcher | 1 month ago
I really would like to see a small language that compiles to wasm in the browser.
Of course you can use things like Lua that has it's own vm also in wasm. Or Rhai with it's own interpreter. But I am looking for a language that compiles to wasm in less than 1Mb of wasm
publicdebates|1 month ago
https://github.com/remko/waforth
> WAForth is entirely written in (raw) WebAssembly*, and the compiler generates WebAssembly code on the fly.
* https://github.com/remko/waforth/blob/master/src/waforth.wat
tromp|1 month ago
nhatcher|1 month ago
burntcaramel|1 month ago
I made Orb as a DSL over raw WebAssembly in Elixir. This gives you extract niceties like |> piping, macros so you can add language features like arenas or tuples, and reusability of code in modules (you can even publish to the package manager Hex). By manipulating the raw WebAssembly instructions it lets you compile to kilobytes instead of megabytes. I’m tinkering on the project over at: https://github.com/RoyalIcing/Orb
spankalee|1 month ago
I think it really helps to have a language designed from the ground-up to obsess over bytes for WASM. Trying to do that with a familiar high-level language with a rich standard library is tricky.
mathisfun123|1 month ago
nhatcher|1 month ago
veqq|1 month ago
Janet, a Clojure-like Lisp compiles a whole playground of itself and the std lib in 823kb: https://janetdocs.org/playground
https://codeberg.org/veqq/janetdocs/src/branch/master/public...
you can do smaller for other things.
zamadatix|1 month ago
spankalee|1 month ago