You are viewing a single comment's thread from:

RE: Intro to Rust Web Assembly with Rust's Wasm Bindgen Library

in #utopian-io6 years ago

Thank you for covering tutorials about WebAssembly and Rust, this will help Developer interested in WebAssembly to build their own wasm npm package (using wasm-pack). From what I know Rust std library doesn't yet support compiling to target wasm32 and embedded. Regarding that, I'm curious if:

  1. is it possible to create a monorepo project purely in Rust using wasm-bindgen that can be compiled targeting wasm32 and x86_64?
  2. can I create WebComponent purely in Rust using wasm-bindgen?
Sort:  

Firstly, the standard library will compile to Wasm32 for the most part. There are a few small features that do not work (pointers for instance) but you can include any of the libraries in the core of rust in your wasm project with bindgen. (You can also include many of the 3rd party libraries as well.)

  1. You can create a monorepo with bindgen and not reference any JS functions.

  2. From what I know you can't fully make a webcomponent in wasm-bindgen, but there are alternatives that do allow for this.