-
Notifications
You must be signed in to change notification settings - Fork 277
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[feature] #1425: Wasm helper crate #1816
Conversation
b516ee2
to
26327cd
Compare
Codecov Report
@@ Coverage Diff @@
## iroha2-dev #1816 +/- ##
==============================================
+ Coverage 77.85% 78.38% +0.53%
==============================================
Files 148 148
Lines 21501 21511 +10
==============================================
+ Hits 16739 16862 +123
+ Misses 4762 4649 -113
Continue to review full report at Codecov.
|
quote! { | ||
#[no_mangle] | ||
unsafe extern "C" fn _iroha_wasm_main(ptr: u32, len: u32) { | ||
#fn_name(iroha_wasm::_decode_from_raw::<AccountId>(ptr, len)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should the function #fn_name
receive account_id
as a parameter?
d2c862d
to
0f9d1ff
Compare
e7c26fd
to
29a3f5c
Compare
91c1360
to
947c58d
Compare
2fec581
to
238044a
Compare
59c2a50
to
565d0a3
Compare
6e9dc8d
to
1410de1
Compare
Signed-off-by: Marin Veršić <[email protected]>
@@ -2,6 +2,7 @@ | |||
**/blocks/ | |||
**/*.rs.bk | |||
**/rusty-tags.vi | |||
/**/Cargo.lock |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That could break cargo chef
in the iroha2-dev
docker file. Are you sure you want to exclude it?
Description of the Change
Smartcontract example:
The pattern I used for testing to inject mocked objects is something I saw in the mockall crate. I like it because it doesn't infect the external API unlike the pattern we use with traits. I previously used this crate successfully, although I think I encountered some bugs but didn't investigate into it.
Problems
iroha_wasm
in the workspace seems to affectcfg(test)
resolutioniroha_wasm
it has to be build with nightly compilerIssue
Closes #1425
Benefits
Internal are hidden from the user. All user has to do is annotate one of their methods with
iroha_wasm
Possible Drawbacks
Usage Examples or Tests [optional]
Alternate Designs [optional]