Ask HN: Languages Designed for WASM?
5 points by 90s_dev 4 days ago | 12 commentsMost likely:
curlywas (https://github.com/exoticorn/curlywas) -- c-like but very low-level; seems very complete; rust impl; mit license; short but seemingly thorough docs?
wa (https://github.com/wa-lang/wa) -- go-like, not clear how high/low level it is, thorough docs, seems promising, agpl license, lots of mandarin in docs
virgil (https://github.com/titzer/virgil) -- ruby-like? gc; cant find license; last commit 3 hours ago; thorough docs but all in md files in repo
assemblyscript (https://github.com/AssemblyScript/assemblyscript) -- typescript-like; apache 2 license, minimal runtime with gc; implemented in js
walt (https://github.com/ballercat/walt) -- JavaScript-like made for wasm, 25 contributors! decent looking docs, might actually be usable! most commits 7 years ago but last commit 3 years ago though, mit license
onyx (https://wasmer.io/posts/onyxlang-powered-by-wasmer, https://github.com/onyx-lang/onyx) -- ocaml-like? recent activity, full docs, bsd license, not sure if it has lower level capabilities or how much the higher level features cost at runtime or build time
waforth (https://github.com/remko/waforth) -- forth for wasm! upside is that its forth, downside is that its forth; mit license; great docs; seemingly inefficient due to constant lookups?
Less likely:
thinscript (https://github.com/evanw/thinscript) -- js-like with macros; abandoned 9 years ago; not yet licensed
wase (https://github.com/area9innovation/wase) -- C-like syntax but still wasm-like, not super recent but not super old, only a few contributors, not sure how complete it is but its docs give a feeling of being mostly-complete, MIT license
wam (https://github.com/kanaka/wam) -- wasm macro preprocessor, just one guy, last commit 7 years ago, very few built in macros, mozilla license (???)
wah (https://github.com/tmcw/wah) -- wasm but with infix, doesn't seem extensible with macros, two contributors, last commit 8 years ago, eclipse license (???)
Honorable mentions:
mini-c (https://github.com/maierfelix/mini-c) -- C to wasm compiler, seemingly abandoned 8 years ago, not sure how complete it is
c4wa (https://github.com/kign/c4wa) -- c to wasm compiler, no activity in 3 years, no license, written in java
- 90s_dev 4 days agoI am leaning towards curlywas strangely enough. It just feels like the right language somehow. Not too low level to be boring to write, not too high level to take the fun out of writing low level code, not too old to consider it abandoned, docs relatively thorough and thoughtful, just enough syntax to make it familiar to C programmers and become a good stepping stone into writing C (maybe).
- 90s_dev 4 days agoOne thing it's missing is arrays/structs as a way to access memory more conveniently, which I think is probably a must-have, though I bet I could add them on top of this language with how small it looks. Well, except that it's written in Rust and I don't understand Rust despite trying many times.
- 90s_dev 4 days ago
- Lio 3 days agoI'd not heard of Virgil before but Ruby itself can run on WASM:
https://github.com/ruby/ruby.wasm
(That's not strictly "designed for" as in the question but I thought it might be interesting all the same).
- jedisct1 4 days agoZig.
Zig produces extremely small, optimized WebAssembly modules. The language includes WebAssembly-specific built-ins like @wasmMemoryGrow, and its entire standard library offers first-class support for WebAssembly.
Zig can also optimize code for specific WebAssembly runtimes, making it, in my opinion, the most efficient WebAssembly compiler available today.
- 90s_dev 4 days agoI forgot to mention that I'd like it to be embeddable. I was in the zig subreddit and asked about that, they said basically no it's not possible to embed it, the best that can be done is bundle zig with my app and run it as a subproc to compile zig code, but then I have to do ipc and shared memory and it's a whole other bundle of worms.
- 90s_dev 4 days ago
- Alex-Programs 4 days agoThis looks fun. I don't have any specific suggestions - I've always used WASM with Rust - but I wish you luck with your project!
P.S. You might have more success with replies on Reddit. HN is very all-or-nothing.
- 90s_dev 2 days agoTried the reddit thing, funny story. I tried to post to the wasm sub and it said it was restricted. I posted to webdev and they said maybe try posting it at the programminglanguages sub. So I tried there and they deleted it! I don't understand anyone anymore.
- Alex-Programs 1 day agoClassic Reddit. IRC, perhaps? :)
- 90s_dev 1 day agoDoes anyone still use IRC? I thought freenode died?
- 90s_dev 1 day ago
- Alex-Programs 1 day ago
- 90s_dev 4 days agoThanks I'll give it a try.
- 90s_dev 2 days ago