-
Notifications
You must be signed in to change notification settings - Fork 6
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
Support 128-bit system API for cycles #54
Conversation
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.
Nice work
CARGO_TARGET_WASM32_UNKNOWN_UNKNOWN_LINKER = "${nixpkgs.llvmPackages_11.lld}/bin/lld"; | ||
RUSTFLAGS = "-C link-arg=-s"; # much smaller wasm | ||
CARGO_TARGET_WASM32_UNKNOWN_UNKNOWN_LINKER = "${nixpkgs.llvmPackages_12.lld}/bin/lld"; | ||
RUSTFLAGS = "-C link-arg=-s -C target-feature=+multivalue"; # much smaller wasm |
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.
I’m surprised this work, given rust-lang/rust#73755, but 🤷🏻 :-)
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.
I was quite surprised too, when I found it working. I gave it a go and I did not regret. :)
However, there is one last problem. Even though the produced WASM is correct, the compiler spits out following warnings: "warning: extern
block uses type (u64, u64)
, which is not FFI-safe". We can mitigate this at a price of obfuscating types by using a tuple struct, i.e. Pair(u64, u64)
. More radical option is to disable the troublesome check. What do you think?
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.
For ic-ref-test
, I have no strong opinions. If using a tuple struct works, go head – what matters is what happens on the Wasm level.
Thanks for the review, @nomeata! |
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.
LGTM. cc @AlexandraZapuc
No description provided.