News for hackers. Stuff that matters.
Re:Hello wasm-pack by ridiculous_fish on Wednesday April 18, 2018 @04:18PM (#16870781)
In its wasm-rewrite, the source-map module acquired a destructor that must be manually invoked by its clients [1]. This makes the API much worse. Is this typical of JS APIs that use wasm?

1: https://github.com/mozilla/source-map#sourcemapconsumerproto...

Re:Hello wasm-pack by arcatek on Wednesday April 18, 2018 @04:32PM (#16870909)
Yes, the gc isn't exposed yet, so neither JS nor wasm are notified when an object goes out of scope (which would allow to reclaim the memory on the wasm side). It's on the roadmap, so it should eventually come.
Re:Hello wasm-pack by tschneidereit on Thursday April 19, 2018 @08:33AM (#16875304)
This is indeed a problem for Wasm/JS integration. The JS WeakRef proposal[1] will address it for many use cases, and the WebAssembly GC proposal[2], combined with JS Typed Objects[3] will address many others. Even before those features will be available, I'd expect the community to iterate on patterns to make APIs nicer.

[1] https://github.com/tc39/proposal-weakrefs [2] https://github.com/WebAssembly/meetings/blob/master/2018/pre... [3] https://github.com/tschneidereit/typed-objects-explainer