Lets create wasm module from cargo project.
Cargo project
Creation
Files creation
Create new files in src folder.- lib.rs
- mod_1.rs
- mod_2.rs
Code insertion
Files tree of simple_cargo_project folder
Wasm module generation
Now we have simple_cargo_project.wasm module in root folder. You can download wasm module here.
Wasm module connection
- add_one_from_mod_1
- add_two_from_mod_1
- add_three_from_mod_2
- add_four_from_mod_2