Skip to content

Add more CLI flags for wasm features#917

Merged
alexcrichton merged 4 commits intobytecodealliance:masterfrom
alexcrichton:more-feature-flags
Feb 7, 2020
Merged

Add more CLI flags for wasm features#917
alexcrichton merged 4 commits intobytecodealliance:masterfrom
alexcrichton:more-feature-flags

Conversation

@alexcrichton
Copy link
Copy Markdown
Member

This commit adds a few more flags to enable wasm features via the CLI,
mirroring the existing --enable-simd flag:

  • --enable-reference-types
  • --enable-multi-value
  • --enable-threads
  • --enable-bulk-memory

Additionally the bulk memory feature is now automatically enabled if
reference-types or threads are enabled since those two proposals
largely depend on bulk-memory.

This commit adds a few more flags to enable wasm features via the CLI,
mirroring the existing `--enable-simd` flag:

* `--enable-reference-types`
* `--enable-multi-value`
* `--enable-threads`
* `--enable-bulk-memory`

Additionally the bulk memory feature is now automatically enabled if
`reference-types` or `threads` are enabled since those two proposals
largely depend on `bulk-memory`.
@sunfishcode
Copy link
Copy Markdown
Member

Should we have an --enable-all too, like wabt does?

@alexcrichton
Copy link
Copy Markdown
Member Author

Sounds good to me! Added now

@fitzgen
Copy link
Copy Markdown
Member

fitzgen commented Feb 6, 2020

Should we have an --enable-all too, like wabt does?

+1 from me

Copy link
Copy Markdown
Member

@peterhuene peterhuene left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Just some comment suggestions. The doc comments for the new options are user-facing, so those got special attention for consistency. Please feel free to resolve the review comments if you don't like the suggestions.

Comment thread src/lib.rs Outdated
Comment thread src/lib.rs Outdated
Comment thread src/lib.rs Outdated
Comment thread src/lib.rs Outdated
Comment thread src/lib.rs Outdated
Comment thread crates/api/src/runtime.rs Outdated
alexcrichton and others added 2 commits February 7, 2020 04:05
Co-Authored-By: Peter Huene <peterhuene@protonmail.com>
Co-Authored-By: Peter Huene <peterhuene@protonmail.com>
@alexcrichton alexcrichton merged commit a6adf52 into bytecodealliance:master Feb 7, 2020
@alexcrichton alexcrichton deleted the more-feature-flags branch February 7, 2020 10:07
alexcrichton added a commit to alexcrichton/wasmtime that referenced this pull request Nov 19, 2024
Some of this originated in bytecodealliance#917 but nowadays it shouldn't be necessary
to control proposals like this. Instead it's probably best nowadays to
throw configuration at `wasmparser` and use its definition of features
to determine whether constructs make sense or not. This reduces the
amount of bits and pieces Wasmtime has to do and avoids interactions
such as bytecodealliance#9622.

Closes bytecodealliance#9622
alexcrichton added a commit to alexcrichton/wasmtime that referenced this pull request Nov 19, 2024
Some of this originated in bytecodealliance#917 but nowadays it shouldn't be necessary
to control proposals like this. Instead it's probably best nowadays to
throw configuration at `wasmparser` and use its definition of features
to determine whether constructs make sense or not. This reduces the
amount of bits and pieces Wasmtime has to do and avoids interactions
such as bytecodealliance#9622.

Closes bytecodealliance#9622
github-merge-queue bot pushed a commit that referenced this pull request Nov 19, 2024
Some of this originated in #917 but nowadays it shouldn't be necessary
to control proposals like this. Instead it's probably best nowadays to
throw configuration at `wasmparser` and use its definition of features
to determine whether constructs make sense or not. This reduces the
amount of bits and pieces Wasmtime has to do and avoids interactions
such as #9622.

Closes #9622
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants