-
Notifications
You must be signed in to change notification settings - Fork 17
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
feat: remove multivalue and reference-types features from rustc >= 1.82.0 #229
Conversation
@race-of-sloths score 5 |
@PolyProgrammist Thank you for your contribution! Your pull request is now a part of the Race of Sloths! Current status: waiting for merge
Your contribution is much appreciated with a final score of 5! What is the Race of SlothsRace of Sloths is a friendly competition where you can participate in challenges and compete with other open-source contributors within your normal workflow For contributors:
For maintainers:
Feel free to check our website for additional details! Bot commands
|
0a4b207
to
bcc1a7c
Compare
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.
blocking it for now
i've encountered following results with testing scenario from let contract_wasm =
std::fs::read("./target/wasm32-unknown-unknown/release/cargo_near_new.wasm")
.expect("read wasm"); ) If wasm is generated with outcome ExecutionFinalResult {
total_gas_burnt: NearGas {
inner: 1421248428811,
},
transaction: ExecutionOutcome {
transaction_hash: 51Ct4JFSG6X4PdqE8NjYqUakso4uoeCnvzQ8nNgDYKhx,
block_hash: 2MQiD91ddgPXMw71DZqzediNFJ39iMqbEcAjspRSA9bn,
logs: [],
receipt_ids: [
rgoCk8tLruUj6S5CHJfScDt6imKrsb9KgGLZGyPZ91M,
],
gas_burnt: NearGas {
inner: 309919164885,
},
tokens_burnt: NearToken {
inner: 30991916488500000000,
},
executor_id: AccountId(
"dev-20241007194856-60669284714414",
),
status: SuccessReceiptId(rgoCk8tLruUj6S5CHJfScDt6imKrsb9KgGLZGyPZ91M),
},
receipts: [
ExecutionOutcome {
transaction_hash: rgoCk8tLruUj6S5CHJfScDt6imKrsb9KgGLZGyPZ91M,
block_hash: 2y1ta45b5edzTrUR7CAENzehw9x7LRvUEGWfa2P8e81e,
logs: [],
receipt_ids: [
8M3kEg7p7WZWD3zA3zpLUDNgGSg6duPxxDuhZuAnYJdL,
],
gas_burnt: NearGas {
inner: 888146701426,
},
tokens_burnt: NearToken {
inner: 88814670142600000000,
},
executor_id: AccountId(
"dev-20241007194855-75721432061861",
),
status: Failure(ActionError(ActionError { index: Some(0), kind: FunctionCallError(CompilationError(PrepareError(Deserialization))) })),
},
ExecutionOutcome {
transaction_hash: 8M3kEg7p7WZWD3zA3zpLUDNgGSg6duPxxDuhZuAnYJdL,
block_hash: 9zUuAG6YS3doyEbw3JkZUeWLKc6NwAPWzSSwsw4rBWc2,
logs: [],
receipt_ids: [],
gas_burnt: NearGas {
inner: 223182562500,
},
tokens_burnt: NearToken {
inner: 0,
},
executor_id: AccountId(
"dev-20241007194856-60669284714414",
),
status: SuccessValue(''),
},
],
status: Failure(ActionError(ActionError { index: Some(0), kind: FunctionCallError(CompilationError(PrepareError(Deserialization))) })),
}
thread 'test_contract_is_operational' panicked at tests/test_basics.rs:22:5:
assertion failed: outcome.is_success() If wasm is generated with |
@dj8yfo got it. But do you want to build with nightly when the user wants to build with stable? Because -Z is only available in nightly |
And do you want me to enable the test you provided in CI? |
not clear how to proceed yet
The following case might be a good addition: run equivalent of Please, create a separate pr for the test, if you want to do it. |
@dj8yfo got it. I will try to find out what is the best option |
For now left this comment in related issue in WebAssembly tool-conventions repository WebAssembly/tool-conventions#233 (comment) |
the following compile errors are triggered by #[cfg(all(target_family = "wasm", target_feature = "reference-types"))]
compile_error!("Compiler configuration is unsupported by <ENV NAME HERE>, because a Wasm target-feature is enabled that is not yet supported: reference-types. Use Rust 1.81 or older to get a compatible default configuration.");
#[cfg(all(target_family = "wasm", target_feature = "multivalue"))]
compile_error!("Compiler configuration is unsupported by <ENV NAME HERE>, because a Wasm target-feature is enabled that is not yet supported: multivalue. Use Rust 1.81 or older to get a compatible default configuration."); |
Do I read it right that we are basically out of luck with the stable Rust 1.82+? It seems to me that there are three options:
@PolyProgrammist @dj8yfo Are we on the same page? If so, I would focus on (1) and (3) |
Yes, I guess these are the options. And I 1 and 3 sound good. Also, for 2 std recompiling is only possible with nightly compiler |
We worked around the compatibility issue by running |
@PolyProgrammist Thank you for your contribution! Your pull request is now a part of the Race of Sloths! Current status: staleThis pull request was removed from the race, but you can include it again with What is the Race of SlothsRace of Sloths is a friendly competition where you can participate in challenges and compete with other open-source contributors within your normal workflow For contributors:
For maintainers:
Feel free to check our website for additional details! Bot commands
|
According to: https://blog.rust-lang.org/2024/09/24/webassembly-targets-change-in-default-target-features.html