Rust wasm
webassembly in Rust
WebAssembly 開発環境構築の本 | WebAssembly 開発環境構築の本
Introduction - Rust and WebAssembly
web_sys::XmlHttpRequest - Rust
Compiling from Rust to WebAssembly | MDN
Rust で WebAssembly を出力する
202101
Hello, World! - Rust and WebAssembly
code:wasm.test
rustup update
cargo generate --git https://github.com/rustwasm/wasm-pack-template
初めてRustでWebAssemblyするときに紹介したいチュートリアル (入門) - Qiita
/home/kanna/coding/rust_projects/hello_wasm
cargo v1.29
rustc v1.29.1
npm v6.4.1
$ cargo install wasm-pack
rustwasm/wasm-pack: 📦✨ your favorite rust -> wasm workflow tool!
wasm-pack
update するには install スクリプト
1.30.0以上が必要
$ cargo new --lib hello-wasm
コード書いて
$ hello_wasm> wasm-pack build
$ hello_wasm> npm init wasm-app www
wasm-appというテンプレがある
rustwasm/create-wasm-app: npm init template for consuming rustwasm pkgs
自作したパッケージを利用するように書き換える
$ hello_wasm/pkg> npm link
$ hello_wasm/www> npm link hello_wasm
$ hello_wasm/www> npm install
$ hello_wasm/www> npm run start
sh: webpack-dev-server: コマンドが見つかりません
npm install webpack-dev-server -g
Compiling from Rust to WebAssembly - WebAssembly | MDN