Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit cfb2f98

Browse files
committed
Enable WebAssembly features by default on wasm64
These are all stable as-of-now in the WebAssembly specification so any engine which implements wasm64 will surely implement these features as well.
1 parent 7f3ffbc commit cfb2f98

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

compiler/rustc_target/src/spec/wasm64_unknown_unknown.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ pub fn target() -> Target {
2828
lld_args.push("--no-entry".to_string());
2929
lld_args.push("-mwasm64".to_string());
3030

31+
// Any engine that implements wasm64 will surely implement the rest of these
32+
// features since they were all merged into the official spec by the time
33+
// wasm64 was designed.
34+
options.features = "+bulk-memory,+mutable-globals,+sign-ext,+nontrapping-fptoint".to_string();
35+
3136
Target {
3237
llvm_target: "wasm64-unknown-unknown".to_string(),
3338
pointer_width: 64,

0 commit comments

Comments
 (0)