mnemonik
Joined 18 years ago
Joined 18 years ago
However, that doesn't mean that you can't use it now. wasm-bindgen is essentially a polyfill for host bindings plus some other little things.
Some resources to check out if you want to learn more:
* Host bindings: https://github.com/WebAssembly/host-bindings/blob/master/pro...
* More info about web-sys (web-sys is like the raw libc for the web): https://rustwasm.github.io/wasm-bindgen/web-sys/index.html
* API documentation for web-sys: https://docs.rs/web-sys/0.3.2/web_sys/
* DOM hello world example: https://rustwasm.github.io/wasm-bindgen/examples/dom.html
* A mini MS Paint style example: https://rustwasm.github.io/wasm-bindgen/examples/paint.html
* An FM synth in WebAudio: https://rustwasm.github.io/wasm-bindgen/examples/web-audio.h...
Fix is over in https://github.com/fitzgen/source-map-mappings/pull/15
> which IIRC requires unsafe access as it's not thread-safe
Yes, and also has no guarantees against mutably aliasing and re-entry.
Note that wasm currently has no shared memory threading (just message passing via FFI through JS and workers), so thread-safety isn't an issue to be wary of here, just re-entry.
We've already fixed some of these issues[0] but I didn't update the code snippets in the article -- woops!
[0] https://github.com/tromey/vlq/commit/3b41a2b6c778ce476eaaa28...
Yes, the component model is a standard developed under the umbrella of the W3C's WebAssembly Community Group.
That said, while it is relatively stable and hasn't changed much in the last year or so, the component model has not graduated through all the phases of the standardization process yet. It doesn't, for example, have a formal specification yet, although its canonical ABI does have a reference implementation in Python.
https://github.com/WebAssembly/component-model/