WebAssemblyの言語としての仕様を理解するため、Rustのコードがrustc/wasm-bindgenによってWebAssemblyにどのようにコンパイルされるかを延々と試したメモ。Mapping High Level Constructs to LLVM IRを意識している。 yubrot/wasm-sandbox - GitHub WebAssembly Specification WebAssembly Interface Types Proposal WebAssembly Interface Types: Interoperate with All the Things! rustwasm/wasm-bindgen ビルドにはwasm-packを用いているため、出力はnpmパッケージの形になる。また .wasm ファイルはwasm-optによる最適化がかかった形となる。