You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To pass Miden SDK functions through the Wasm CM we need to define all low-level Miden SDK functions in a WIT interface that would be imported to the user's WIT world.
Here is how it is drafted:
Hard-code the Miden SDK WIT interfaces in cargo-miden and save as a WIT file in the new project template generation.
Option 2
Generate the WIT interface from the Miden SDK public API.
Keep in mind that all the functions in Miden SDK WIT interface should be skipped during the Rust binding generation (via wit-bindgen). See #341 for details. If we could cover that in Option 2 this might make it worth the effort.
The text was updated successfully, but these errors were encountered:
Discovered in #329
Why
To pass Miden SDK functions through the Wasm CM we need to define all low-level Miden SDK functions in a WIT interface that would be imported to the user's WIT world.
Here is how it is drafted:
compiler/tests/rust-apps-wasm/rust-sdk/basic-wallet/wit-sdk/miden-core-import.wit
Lines 1 to 59 in 6a59e3d
In the user's WIT file it should be imported in the world:
compiler/tests/rust-apps-wasm/rust-sdk/basic-wallet/wit/basic-wallet.wit
Line 16 in 6a59e3d
How
Option 1
Hard-code the Miden SDK WIT interfaces in cargo-miden and save as a WIT file in the new project template generation.
Option 2
Generate the WIT interface from the Miden SDK public API.
Keep in mind that all the functions in Miden SDK WIT interface should be skipped during the Rust binding generation (via wit-bindgen). See #341 for details. If we could cover that in Option 2 this might make it worth the effort.
The text was updated successfully, but these errors were encountered: