Set up rust + wasm + TypeScript without webpack
Sunday, April 25, 2021
1 Set up the rust code and wasm-pack install wasm-pack Set up a new project with wasm-pack. Run 1 2 $ wasm-pack new hello-wasm $ cd hello-wasm Build with this command 1 $ wasm-pack build --target web This should produce a pkg/ directory which should contain some d.ts file, a .wasm file and a .js file in ES6 module format.
2 Set up the TypeScript code Now we should set up a JavaScript project.…