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

Remove cranelift from sys-default feature #3004

Closed
wants to merge 1 commit into from

Conversation

fschutt
Copy link
Contributor

@fschutt fschutt commented Jul 4, 2022

When using the Wasmer-WASI crate, the sys-default feature from wasmer is depending upon, which causes the following to conflict:

[dependencies.wasmer]
version = "2.0"
default-features=false
features=["sys" , "compiler-singlepass", "engine-universal"]

[dependencies.wasmer-wasi]
version = "2.0"

Because wasmer-wasi "2.0" depends on wasmer with the default features, which implies using cranelift, which conflicts with singlepass.

Fixes #2882

Review

  • Add a short description of the change to the CHANGELOG.md file

@fschutt fschutt marked this pull request as draft July 4, 2022 15:53
@fschutt fschutt force-pushed the remove-cranelift-default branch from 499fca6 to 9b5bcda Compare July 5, 2022 10:53
@fschutt fschutt marked this pull request as ready for review July 5, 2022 10:56
CHANGELOG.md Show resolved Hide resolved
lib/wasi/Cargo.toml Outdated Show resolved Hide resolved
lib/wasi/Cargo.toml Outdated Show resolved Hide resolved
@fschutt fschutt force-pushed the remove-cranelift-default branch from 1c32873 to eb12cef Compare July 5, 2022 13:43
@fschutt fschutt requested a review from syrusakbary as a code owner July 5, 2022 13:43
@fschutt fschutt force-pushed the remove-cranelift-default branch 3 times, most recently from 4a86f5d to a43803f Compare July 5, 2022 13:58
@fschutt fschutt requested a review from epilys July 5, 2022 14:19
@fschutt fschutt force-pushed the remove-cranelift-default branch from a43803f to 7303b82 Compare July 5, 2022 14:46
Comment on lines 55 to 57
compiler-singlepass = ["wasmer/default-singlepass"]
compiler-cranelift = ["wasmer/default-cranelift"]
compiler-llvm = ["wasmer/default-llvm"]
Copy link
Member

Choose a reason for hiding this comment

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

I don't think we need this.

Makefile Outdated
@@ -486,10 +486,10 @@ test-packages:
test-js: test-js-api test-js-wasi

test-js-api:
cd lib/api && wasm-pack test --node -- --no-default-features --features js-default,wat
cd lib/api && wasm-pack test --node -- --no-default-features --features js-default,wat,default-compiler
Copy link
Member

Choose a reason for hiding this comment

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

No compiler shall be included here I believe

Makefile Outdated

test-js-wasi:
cd lib/wasi && wasm-pack test --node -- --no-default-features --features test-js
cd lib/wasi && wasm-pack test --node -- --no-default-features --features test-js,default-compiler
Copy link
Member

Choose a reason for hiding this comment

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

No compiler shall be included here I believe

@@ -46,12 +46,16 @@ wasm-bindgen-test = "0.3.0"
tracing-wasm = "0.2"

[features]
default = ["sys-default"]
default = ["wasmer/sys", "wasmer/wat", "wasmer/default-engine", "sys", "logging", "host-fs", "sys-poll", "host-vnet"]
Copy link
Member

Choose a reason for hiding this comment

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

Those are parts already of sys-default. It's way better to keep using those

Comment on lines 15 to 16
wasmer = { path = "../../../lib/api", version = "=2.3.0", default-features = false, features = ["experimental-reference-types-extern-ref"] }
wasmer-wasi = { path = "../../../lib/wasi", version = "=2.3.0" }
wasmer-wasi = { path = "../../../lib/wasi", version = "=2.3.0", features = ["compiler-cranelift"] }
Copy link
Member

Choose a reason for hiding this comment

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

I think we can just have:

Suggested change
wasmer = { path = "../../../lib/api", version = "=2.3.0", default-features = false, features = ["experimental-reference-types-extern-ref"] }
wasmer-wasi = { path = "../../../lib/wasi", version = "=2.3.0" }
wasmer-wasi = { path = "../../../lib/wasi", version = "=2.3.0", features = ["compiler-cranelift"] }
wasmer = { path = "../../../lib/api", version = "=2.3.0", default-features = false, features = ["experimental-reference-types-extern-ref", "cranelift"] }
wasmer-wasi = { path = "../../../lib/wasi", version = "=2.3.0" }

When using the Wasmer-WASI crate, the sys-default feature from
wasmer is depending upon, which causes the following to conflict:

[dependencies.wasmer]
version = "2.0"
default-features=false
features=["sys" , "compiler-singlepass", "engine-universal"]

[dependencies.wasmer-wasi]
version = "2.0"

Because wasmer-wasi "2.0" depends on wasmer with the default features,
which implies using cranelift, which conflicts with singlepass.

Fixes #2882
@fschutt fschutt force-pushed the remove-cranelift-default branch from 7303b82 to 49551d6 Compare July 6, 2022 13:31
@epilys epilys closed this Jul 21, 2022
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.

Wasmer-WASI depends on Cranelift by default
3 participants