Skip to content
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

build with WASM SIMD128 instructions enabled by default #32

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

redfave
Copy link

@redfave redfave commented Jan 18, 2022

Since SIMD is in wasmedge 0.9.0 enabled by default, it would be also sensible to build the QuickJS interpreter with SIMD instructions enabled by default.

@juntao
Copy link
Member

juntao commented Jan 28, 2022

Just FYI. In order to enable SIMD support, the QuickJS C code (not just Rust wrapper) must also be compiled with SIMD. We are working on this feature and will have results soon. Thanks.

@juntao
Copy link
Member

juntao commented Apr 5, 2023

flows summarize

Copy link
Member

juntao commented Apr 5, 2023

Hello, I am a serverless review bot on flows.network. Here are my reviews of code commits in this PR.


Commit 1

This patch creates a new file called .cargo/config.toml. In this patch, two lines are added to the config file:

  1. [build]: It creates a [build] section in the configuration file to specify the build options for the project.
  2. rustflags = "-C target-feature=+simd128": It enables the WASM SIMD128 instructions by default during the build process, setting the appropriate compiler flags through rustflags. This change allows the code to leverage the SIMD (Single Instruction, Multiple Data) parallel processing capability for performance improvements.

The potential problems that could arise from this change include:

  1. Compatibility issues: Enabling SIMD128 instructions could introduce compatibility issues. Not all environments support WASM SIMD128, and it may cause the code to malfunction or not run in some environments.
  2. No newline at the end of the file: This is a minor issue but may cause conflicts during in future merges. Adding a newline at the end of the file is a best practice to avoid conflicts when multiple developers work on the same file.

@lastmjs
Copy link

lastmjs commented Jan 3, 2024

How can I turn off SIMD? I'm trying to use wasmedge-quickjs outside of wasmedge and this is blocking our Wasm validation. I don't have easy control over the Wasmtime environment.

@lastmjs lastmjs mentioned this pull request Jan 3, 2024
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.

3 participants