Skip to content

Commit

Permalink
Force rustix to use libc (paritytech#12123)
Browse files Browse the repository at this point in the history
  • Loading branch information
koute authored and ark0f committed Feb 27, 2023
1 parent 7766e94 commit e30164f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 11 additions & 1 deletion client/executor/wasmtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ codec = { package = "parity-scale-codec", version = "3.0.0" }
libc = "0.2.121"
log = "0.4.17"
parity-wasm = "0.42.0"

# When bumping wasmtime do not forget to also bump rustix
# to exactly the same version as used by wasmtime!
wasmtime = { version = "0.38.0", default-features = false, features = [
"cache",
"cranelift",
Expand All @@ -33,9 +36,16 @@ sp-sandbox = { version = "0.10.0-dev", path = "../../../primitives/sandbox" }
sp-wasm-interface = { version = "6.0.0", features = ["wasmtime"], path = "../../../primitives/wasm-interface" }

[target.'cfg(target_os = "linux")'.dependencies]
rustix = { version = "0.35.6", default-features = false, features = ["std", "mm", "fs", "param"] }
rustix = { version = "0.35.6", default-features = false, features = ["std", "mm", "fs", "param", "use-libc"] }
once_cell = "1.12.0"

# Here we include the rustix crate used by wasmtime just to enable its 'use-libc' flag.
#
# By default rustix directly calls the appropriate syscalls completely bypassing libc;
# this doesn't have any actual benefits for us besides making it harder to debug memory
# problems (since then `mmap` etc. cannot be easily hooked into).
rustix_wasmtime = { package = "rustix", version = "0.33.7", default-features = false, features = ["std", "use-libc"] }

[dev-dependencies]
wat = "1.0"
sc-runtime-test = { version = "2.0.0", path = "../runtime-test" }
Expand Down

0 comments on commit e30164f

Please sign in to comment.