Purpose of wasm-bindgen, web-sys

I’m doing Rust/wasm32 development using

  • stdweb crate
  • js! macro
  • unknown target (direct wasm32, not emscripten).

From googling around, I constantly run into wasm-bindgen / web-sys, but I can’t figure out what they contribute.

Question: what does wasm-bindgen / web-sys provide? Is it emscripten-based ? Something orthagonal ? Out dated tech? Future tech ?

have you looked at the Rust WASM website, which has the web documentation, for example wasm-bindgen and web-sys (and further js-sys).

wasm-bindgen is a dual with bindgen but for connecting your rust code to the js things. it can import JavaScript things into Rust and export Rust things to JavaScript.

web-sys is a crate with bindings to all the Web APIs which is mechanically generated by wasm-bindgen using Web IDL

another page to look at is this one which is where I found this info