frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

Open in hackernews

Ask HN: Languages Designed for WASM?

4•90s_dev•1d ago
Hi everyone. I'm on a hunt to find all languages that are designed specifically to compile to WASM. I have a project (hram.dev -- hand-rolled assembly machine) that I want to build to share the joy of unwrapping a new computer in the 80s/90s that boots up with an editor so that you can program it directly in assembly, and I plan to use wamr+llvm for near-native performance while still having isolation so that you can mess things up. Obviously the ability to write WAT directly will be fundamental and certainly fun, but I am looking for higher level languages that make it slightly less convenient to write, to bundle with it internally so that users have at least two choices of how to write code. Do you know of any other languages designed specifically for wasm? These are all I could find:

Most 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

Comments

90s_dev•1d ago
I 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•1d ago
One 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.
Alex-Programs•1d ago
This 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•1d ago
Thanks I'll give it a try.
jedisct1•1d ago
Zig.

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•1d ago
I 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.
Lio•14h ago
I'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).

Ask HN: What Are You Working On? (June 2025)

366•david927•1d ago•1139 comments

Ask HN: What's the 2025 stack for a self-hosted photo library with local AI?

158•jamesxv7•8h ago•76 comments

Ask HN: 80s electronics book club; anyone remember this illustrator?

23•codpiece•2d ago•21 comments

Ask HN: How have you shared computers with your young child (~3 to 5)

10•msencenb•8h ago•10 comments

Ask HN: Which skill do you believe will take the longest to be replaced by AI?

2•atleastoptimal•3h ago•5 comments

Ask HN: Stock Android tablet free of bloatware?

7•miki_tyler•8h ago•2 comments

Canon selphy cp1500 privacy concerns

2•azca•3h ago•2 comments

Ask HN: How did low contrast text become so pervasive?

17•mr-pink•22h ago•16 comments

Ask HN: Which Free Software or Open Source Project Needs Help?

13•em-bee•1d ago•6 comments

A literary magazine accessible only via telnet

28•edent•5d ago•13 comments

Ask HN: Where do you host your Go apps

6•asim•15h ago•3 comments

Ask HN: How Are You Reading HN in June 2025?

4•johncole•4h ago•2 comments

Ask HN: Anyone using augmented reality, VR, glasses, helmets etc. in industry?

86•NewUser76312•5d ago•81 comments

Tell HN: (dictionary|thesaurus).reference.com is now a spam site

50•akkartik•1d ago•13 comments

Ask HN: Is the header CSS broken for you?

45•LorenDB•1d ago•13 comments

Ask HN: Is noprocrast still working for you?

6•infotainment•20h ago•5 comments

Something 'deeper' than Emacs, or am I looking for a unicorn?

4•willschetelich•22h ago•7 comments

Ask HN: Startup shutting down, should we open source?

13•amadeoeoeo•3d ago•36 comments

Ask HN: What do use for private service monitoring?

3•vednig•1d ago•5 comments

Ask HN: Languages Designed for WASM?

4•90s_dev•1d ago•7 comments

A reverse-delta backup strategy – obvious idea or bad idea?

12•datastack•2d ago•25 comments

Ask HN: What Happened to James Halliday ( Substack)?

4•bit1993•1d ago•2 comments

What's the best gem you've found on Hacker News?

5•imwoody•14h ago•4 comments

Ask HN: What's Your Car?

10•behnamoh•11h ago•26 comments

Ask HN: Better-auth or Nextauth or something else

6•dasubhajit•2d ago•0 comments

Ask HN: Why aren't AIs being used as app beta testers yet?

15•amichail•3d ago•25 comments

Ask HN: Why does my Node.js multiplayer game lag at 500 players with low CPU?

15•jbryu•4d ago•26 comments

Tell HN: Meta developer account suspended

172•ArthurVL1•6d ago•83 comments

Ask HN: Alternatives to Cloudflare for DNS?

8•modmodmod•3d ago•8 comments

How do you handle production webhook delivery reliability in your apps?

6•Tanjim•2d ago•4 comments