@wk3368/hello-wasm
TypeScript icon, indicating that this package has built-in type declarations

0.2.0 • Public • Published

A demo of https://developer.mozilla.org/zh-CN/docs/WebAssembly/Rust_to_wasm

Attention

use wasm-pack build --release --target web --scope mynpmusername
instead of wasm-pack build --scope mynpmusername

so we can import init from '@mynpmusername/hello-wasm', then use init().then(greet('name')) other wise, you will got error in console: Uncaught TypeError: Cannot read properties of undefined (reading '__wbindgen_malloc')

Readme

Keywords

none

Package Sidebar

Install

npm i @wk3368/hello-wasm

Weekly Downloads

0

Version

0.2.0

License

MIT/Apache-2.0

Unpacked Size

22.3 kB

Total Files

5

Last publish

Collaborators

  • wk3368