Skip to content

build with WASM SIMD128 instructions enabled by default#32

Open
redfave wants to merge 2 commits into
second-state:mainfrom
redfave:main
Open

build with WASM SIMD128 instructions enabled by default#32
redfave wants to merge 2 commits into
second-state:mainfrom
redfave:main

Conversation

@redfave

@redfave redfave commented Jan 18, 2022

Copy link
Copy Markdown

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.

@alabulei1 alabulei1 requested a review from L-jasmine January 18, 2022 10:53
@juntao

juntao commented Jan 28, 2022

Copy link
Copy Markdown
Member

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

juntao commented Apr 5, 2023

Copy link
Copy Markdown
Member

flows summarize

juntao commented Apr 5, 2023

Copy link
Copy Markdown
Member

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

lastmjs commented Jan 3, 2024

Copy link
Copy Markdown

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