Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/jayphelps/wasm-anyref-demo

Playing around with WebAssembly (Wasm) anyref using JavaScript's GC as the allocator
https://github.com/jayphelps/wasm-anyref-demo

Last synced: 16 days ago
JSON representation

Playing around with WebAssembly (Wasm) anyref using JavaScript's GC as the allocator

Awesome Lists containing this project

README

        

# wasm-anyref-demo

**Requires a fairly recent Node.js version with support for `--experimental-wasm-anyref`. I'm not sure which version off hand, but I'm using v12.7.0**

This is a (relatively speaking) simple demo of using JavaScript's Garbage Collector as the sole heap allocator for a WebAssembly (Wasm) module.

If this is interesting to a number of folks I might take time to explain more about it, as it does require some understanding of a lot of things, but I did include a few comments.

Performance is probably the biggest issue with this approach, but that's known and proposals in the W3C WebAssembly Community Group will fix them eventually.

```bash
npm install
npm start
```