Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Discussion options

Will unison make use of WASM as a backend?

You must be logged in to vote

Replies: 3 comments · 3 replies

Comment options

Also curious about this!

You must be logged in to vote
0 replies
Comment options

Thanks for asking! Right now, we haven't prioritized WASM as a compilation target for Unison for a couple of reasons, but if you feel strongly that this would allow you to use Unison at your organization or job, be sure to drop a note in the comment thread for us to be aware of.

  • WASM doesn't currently support Unison's model for effects, Abilities, which are based on continuations. There's an open discussion about adding continuation support to WASM here from the project maintainers. It's a great read if you're curious about effect handlers and what problems they solve for programming languages. As it stands, performing basic effectful operations in Unison would require some underlying support for continuations in WASM.
  • Garbage collection support in WASM is in active development. Here's the wasm gc MVP doc, if you're curious.

Once features like garbage collection and continuation support are more battle-tested, we could consider investing more time into a WASM backend. For now, the folks working on the compiler / interpreter have been focusing their time on performance improvements for the existing Unison runtime, and the JIT compiler.

You must be logged in to vote
3 replies
@He-Pin
Comment options

Thanks for the detailed input, Unison is cool, I'm asking because if I could have a Unison program running inside my web browser but connected to the Unison Cloud that would be pretty cool too.

@zacharywhitley
Comment options

I'm not sure about continuations but the GC proposal is complete and supported in Chrome and Wasmtime 27.0 https://bytecodealliance.org/articles/wasmtime-27.0

@zacharywhitley
Comment options

Tail calls and GC are now an official part of WebAssembly 3.0

Comment options

I'm actually more interested in compilation to RISC-V, but there was already an outstanding issue for WASM.

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.