mirror of
https://github.com/fluencelabs/wasmer
synced 2024-12-12 22:05:33 +00:00
Merge branch 'master' into feature/metering
This commit is contained in:
commit
f029ea6231
@ -6,6 +6,7 @@ Blocks of changes will separated by version increments.
|
||||
|
||||
## **[Unreleased]**
|
||||
|
||||
- [#476](https://github.com/wasmerio/wasmer/pull/476) Fix bug with wasi::environ_get, fix off by one error in wasi::environ_sizes_get
|
||||
- [#470](https://github.com/wasmerio/wasmer/pull/470) Add mapdir support to Emscripten, implement getdents for Unix
|
||||
- [#467](https://github.com/wasmerio/wasmer/pull/467) `wasmer_instantiate` returns better error messages in the runtime C API
|
||||
- [#463](https://github.com/wasmerio/wasmer/pull/463) Fix bug in WASI path_open allowing one level above preopened dir to be accessed
|
||||
|
194
Cargo.lock
generated
194
Cargo.lock
generated
@ -34,7 +34,7 @@ name = "atty"
|
||||
version = "0.2.11"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"libc 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.57 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"termion 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
@ -52,7 +52,7 @@ dependencies = [
|
||||
"autocfg 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"backtrace-sys 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.57 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rustc-demangle 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
@ -62,7 +62,7 @@ version = "0.1.28"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"cc 1.0.37 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.57 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -137,8 +137,8 @@ dependencies = [
|
||||
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 1.0.91 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_derive 1.0.91 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_derive 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"syn 0.15.34 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"tempfile 3.0.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@ -169,8 +169,8 @@ version = "0.26.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libloading 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.57 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libloading 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -211,19 +211,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
[[package]]
|
||||
name = "cranelift-bforest"
|
||||
version = "0.30.0"
|
||||
source = "git+https://github.com/wasmerio/cranelift.git?branch=wasmer#84ec31b0fdfc10db491ef950815ee2961db057cb"
|
||||
source = "git+https://github.com/wasmerio/cranelift.git?rev=84ec31b0fdfc10db491ef950815ee2961db057cb#84ec31b0fdfc10db491ef950815ee2961db057cb"
|
||||
dependencies = [
|
||||
"cranelift-entity 0.30.0 (git+https://github.com/wasmerio/cranelift.git?branch=wasmer)",
|
||||
"cranelift-entity 0.30.0 (git+https://github.com/wasmerio/cranelift.git?rev=84ec31b0fdfc10db491ef950815ee2961db057cb)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cranelift-codegen"
|
||||
version = "0.30.0"
|
||||
source = "git+https://github.com/wasmerio/cranelift.git?branch=wasmer#84ec31b0fdfc10db491ef950815ee2961db057cb"
|
||||
source = "git+https://github.com/wasmerio/cranelift.git?rev=84ec31b0fdfc10db491ef950815ee2961db057cb#84ec31b0fdfc10db491ef950815ee2961db057cb"
|
||||
dependencies = [
|
||||
"cranelift-bforest 0.30.0 (git+https://github.com/wasmerio/cranelift.git?branch=wasmer)",
|
||||
"cranelift-codegen-meta 0.30.0 (git+https://github.com/wasmerio/cranelift.git?branch=wasmer)",
|
||||
"cranelift-entity 0.30.0 (git+https://github.com/wasmerio/cranelift.git?branch=wasmer)",
|
||||
"cranelift-bforest 0.30.0 (git+https://github.com/wasmerio/cranelift.git?rev=84ec31b0fdfc10db491ef950815ee2961db057cb)",
|
||||
"cranelift-codegen-meta 0.30.0 (git+https://github.com/wasmerio/cranelift.git?rev=84ec31b0fdfc10db491ef950815ee2961db057cb)",
|
||||
"cranelift-entity 0.30.0 (git+https://github.com/wasmerio/cranelift.git?rev=84ec31b0fdfc10db491ef950815ee2961db057cb)",
|
||||
"failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@ -233,22 +233,22 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "cranelift-codegen-meta"
|
||||
version = "0.30.0"
|
||||
source = "git+https://github.com/wasmerio/cranelift.git?branch=wasmer#84ec31b0fdfc10db491ef950815ee2961db057cb"
|
||||
source = "git+https://github.com/wasmerio/cranelift.git?rev=84ec31b0fdfc10db491ef950815ee2961db057cb#84ec31b0fdfc10db491ef950815ee2961db057cb"
|
||||
dependencies = [
|
||||
"cranelift-entity 0.30.0 (git+https://github.com/wasmerio/cranelift.git?branch=wasmer)",
|
||||
"cranelift-entity 0.30.0 (git+https://github.com/wasmerio/cranelift.git?rev=84ec31b0fdfc10db491ef950815ee2961db057cb)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cranelift-entity"
|
||||
version = "0.30.0"
|
||||
source = "git+https://github.com/wasmerio/cranelift.git?branch=wasmer#84ec31b0fdfc10db491ef950815ee2961db057cb"
|
||||
source = "git+https://github.com/wasmerio/cranelift.git?rev=84ec31b0fdfc10db491ef950815ee2961db057cb#84ec31b0fdfc10db491ef950815ee2961db057cb"
|
||||
|
||||
[[package]]
|
||||
name = "cranelift-frontend"
|
||||
version = "0.30.0"
|
||||
source = "git+https://github.com/wasmerio/cranelift.git?branch=wasmer#84ec31b0fdfc10db491ef950815ee2961db057cb"
|
||||
source = "git+https://github.com/wasmerio/cranelift.git?rev=84ec31b0fdfc10db491ef950815ee2961db057cb#84ec31b0fdfc10db491ef950815ee2961db057cb"
|
||||
dependencies = [
|
||||
"cranelift-codegen 0.30.0 (git+https://github.com/wasmerio/cranelift.git?branch=wasmer)",
|
||||
"cranelift-codegen 0.30.0 (git+https://github.com/wasmerio/cranelift.git?rev=84ec31b0fdfc10db491ef950815ee2961db057cb)",
|
||||
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"target-lexicon 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
@ -256,9 +256,9 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "cranelift-native"
|
||||
version = "0.30.0"
|
||||
source = "git+https://github.com/wasmerio/cranelift.git?branch=wasmer#84ec31b0fdfc10db491ef950815ee2961db057cb"
|
||||
source = "git+https://github.com/wasmerio/cranelift.git?rev=84ec31b0fdfc10db491ef950815ee2961db057cb#84ec31b0fdfc10db491ef950815ee2961db057cb"
|
||||
dependencies = [
|
||||
"cranelift-codegen 0.30.0 (git+https://github.com/wasmerio/cranelift.git?branch=wasmer)",
|
||||
"cranelift-codegen 0.30.0 (git+https://github.com/wasmerio/cranelift.git?rev=84ec31b0fdfc10db491ef950815ee2961db057cb)",
|
||||
"raw-cpuid 6.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"target-lexicon 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
@ -266,12 +266,12 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "cranelift-wasm"
|
||||
version = "0.30.0"
|
||||
source = "git+https://github.com/wasmerio/cranelift.git?branch=wasmer#84ec31b0fdfc10db491ef950815ee2961db057cb"
|
||||
source = "git+https://github.com/wasmerio/cranelift.git?rev=84ec31b0fdfc10db491ef950815ee2961db057cb#84ec31b0fdfc10db491ef950815ee2961db057cb"
|
||||
dependencies = [
|
||||
"cast 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"cranelift-codegen 0.30.0 (git+https://github.com/wasmerio/cranelift.git?branch=wasmer)",
|
||||
"cranelift-entity 0.30.0 (git+https://github.com/wasmerio/cranelift.git?branch=wasmer)",
|
||||
"cranelift-frontend 0.30.0 (git+https://github.com/wasmerio/cranelift.git?branch=wasmer)",
|
||||
"cranelift-codegen 0.30.0 (git+https://github.com/wasmerio/cranelift.git?rev=84ec31b0fdfc10db491ef950815ee2961db057cb)",
|
||||
"cranelift-entity 0.30.0 (git+https://github.com/wasmerio/cranelift.git?rev=84ec31b0fdfc10db491ef950815ee2961db057cb)",
|
||||
"cranelift-frontend 0.30.0 (git+https://github.com/wasmerio/cranelift.git?rev=84ec31b0fdfc10db491ef950815ee2961db057cb)",
|
||||
"failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@ -290,15 +290,15 @@ dependencies = [
|
||||
"csv 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"itertools 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.57 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rand_os 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rand_xoshiro 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rayon 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rayon-core 1.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 1.0.91 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_derive 1.0.91 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_derive 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"tinytemplate 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"walkdir 2.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@ -353,7 +353,7 @@ dependencies = [
|
||||
"csv-core 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ryu 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 1.0.91 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -428,7 +428,7 @@ version = "0.2.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"errno-dragonfly 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.57 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
@ -438,7 +438,7 @@ version = "0.1.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"gcc 0.3.55 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.57 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -514,7 +514,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 1.0.91 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -551,7 +551,7 @@ dependencies = [
|
||||
"either 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"enum-methods 0.0.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"inkwell_internal_macros 0.1.0 (git+https://github.com/wasmerio/inkwell?branch=llvm7-0)",
|
||||
"libc 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.57 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"llvm-sys 70.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
@ -597,12 +597,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
version = "0.2.55"
|
||||
version = "0.2.57"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "libloading"
|
||||
version = "0.5.0"
|
||||
version = "0.5.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"cc 1.0.37 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@ -616,7 +616,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"cc 1.0.37 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.57 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"regex 1.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
@ -643,7 +643,7 @@ name = "memchr"
|
||||
version = "2.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"libc 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.57 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -651,7 +651,7 @@ name = "memmap"
|
||||
version = "0.6.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"libc 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.57 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
@ -660,7 +660,7 @@ name = "memmap"
|
||||
version = "0.7.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"libc 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.57 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
@ -677,7 +677,7 @@ dependencies = [
|
||||
"bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"cc 1.0.37 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.57 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
@ -689,7 +689,7 @@ dependencies = [
|
||||
"bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"cc 1.0.37 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.57 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
@ -720,7 +720,7 @@ name = "num_cpus"
|
||||
version = "1.10.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"libc 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.57 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -750,7 +750,7 @@ version = "0.4.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.57 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
@ -768,7 +768,7 @@ name = "parking_lot_core"
|
||||
version = "0.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"libc 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.57 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@ -821,7 +821,7 @@ version = "0.6.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"autocfg 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.57 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rand_hc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@ -876,7 +876,7 @@ name = "rand_jitter"
|
||||
version = "0.1.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"libc 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.57 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
@ -888,7 +888,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.57 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@ -947,7 +947,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"crossbeam-deque 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.57 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
@ -1065,10 +1065,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "serde"
|
||||
version = "1.0.91"
|
||||
version = "1.0.92"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"serde_derive 1.0.91 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_derive 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -1077,7 +1077,7 @@ version = "0.0.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 1.0.91 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -1085,12 +1085,12 @@ name = "serde_bytes"
|
||||
version = "0.10.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"serde 1.0.91 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "serde_derive"
|
||||
version = "1.0.91"
|
||||
version = "1.0.92"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@ -1105,7 +1105,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ryu 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 1.0.91 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -1125,16 +1125,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "structopt"
|
||||
version = "0.2.16"
|
||||
version = "0.2.17"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"structopt-derive 0.2.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"structopt-derive 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "structopt-derive"
|
||||
version = "0.2.16"
|
||||
version = "0.2.17"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@ -1203,7 +1203,7 @@ version = "3.0.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.57 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"redox_syscall 0.1.54 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"remove_dir_all 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@ -1223,7 +1223,7 @@ name = "termion"
|
||||
version = "1.5.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"libc 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.57 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"numtoa 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"redox_syscall 0.1.54 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@ -1250,7 +1250,7 @@ name = "time"
|
||||
version = "0.1.42"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"libc 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.57 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"redox_syscall 0.1.54 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
@ -1260,7 +1260,7 @@ name = "tinytemplate"
|
||||
version = "1.0.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"serde 1.0.91 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
@ -1269,7 +1269,7 @@ name = "toml"
|
||||
version = "0.4.10"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"serde 1.0.91 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -1327,8 +1327,8 @@ name = "wabt"
|
||||
version = "0.7.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"serde 1.0.91 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_derive 1.0.91 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_derive 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"wabt-sys 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
@ -1362,7 +1362,7 @@ dependencies = [
|
||||
"glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"hashbrown 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"structopt 0.2.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"structopt 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"wabt 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"wasmer-clif-backend 0.4.2",
|
||||
"wasmer-dev-utils 0.4.2",
|
||||
@ -1381,19 +1381,19 @@ name = "wasmer-clif-backend"
|
||||
version = "0.4.2"
|
||||
dependencies = [
|
||||
"byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"cranelift-codegen 0.30.0 (git+https://github.com/wasmerio/cranelift.git?branch=wasmer)",
|
||||
"cranelift-entity 0.30.0 (git+https://github.com/wasmerio/cranelift.git?branch=wasmer)",
|
||||
"cranelift-frontend 0.30.0 (git+https://github.com/wasmerio/cranelift.git?branch=wasmer)",
|
||||
"cranelift-native 0.30.0 (git+https://github.com/wasmerio/cranelift.git?branch=wasmer)",
|
||||
"cranelift-wasm 0.30.0 (git+https://github.com/wasmerio/cranelift.git?branch=wasmer)",
|
||||
"cranelift-codegen 0.30.0 (git+https://github.com/wasmerio/cranelift.git?rev=84ec31b0fdfc10db491ef950815ee2961db057cb)",
|
||||
"cranelift-entity 0.30.0 (git+https://github.com/wasmerio/cranelift.git?rev=84ec31b0fdfc10db491ef950815ee2961db057cb)",
|
||||
"cranelift-frontend 0.30.0 (git+https://github.com/wasmerio/cranelift.git?rev=84ec31b0fdfc10db491ef950815ee2961db057cb)",
|
||||
"cranelift-native 0.30.0 (git+https://github.com/wasmerio/cranelift.git?rev=84ec31b0fdfc10db491ef950815ee2961db057cb)",
|
||||
"cranelift-wasm 0.30.0 (git+https://github.com/wasmerio/cranelift.git?rev=84ec31b0fdfc10db491ef950815ee2961db057cb)",
|
||||
"hashbrown 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.57 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"nix 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rayon 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 1.0.91 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde-bench 0.0.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_bytes 0.10.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_derive 1.0.91 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_derive 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"target-lexicon 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"wasmer-runtime-core 0.4.2",
|
||||
"wasmer-win-exception-handler 0.4.2",
|
||||
@ -1405,7 +1405,7 @@ dependencies = [
|
||||
name = "wasmer-dev-utils"
|
||||
version = "0.4.2"
|
||||
dependencies = [
|
||||
"libc 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.57 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -1416,7 +1416,7 @@ dependencies = [
|
||||
"glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"hashbrown 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.57 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"wabt 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@ -1431,7 +1431,7 @@ dependencies = [
|
||||
name = "wasmer-kernel-loader"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"libc 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.57 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"wasmer-runtime-core 0.4.2",
|
||||
]
|
||||
|
||||
@ -1445,7 +1445,7 @@ dependencies = [
|
||||
"hashbrown 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"inkwell 0.1.0 (git+https://github.com/wasmerio/inkwell?branch=llvm7-0)",
|
||||
"lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.57 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"nix 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"regex 1.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@ -1483,7 +1483,7 @@ name = "wasmer-runtime-c-api"
|
||||
version = "0.4.2"
|
||||
dependencies = [
|
||||
"cbindgen 0.8.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.57 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"wasmer-runtime 0.4.2",
|
||||
"wasmer-runtime-core 0.4.2",
|
||||
]
|
||||
@ -1500,15 +1500,15 @@ dependencies = [
|
||||
"hex 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"indexmap 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.57 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"nix 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"page_size 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 1.0.91 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde-bench 0.0.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_bytes 0.10.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_derive 1.0.91 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_derive 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"wasmparser 0.29.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@ -1523,7 +1523,7 @@ dependencies = [
|
||||
"dynasmrt 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"hashbrown 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.57 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"nix 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"wasmer-runtime-core 0.4.2",
|
||||
@ -1549,7 +1549,7 @@ dependencies = [
|
||||
"generational-arena 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"hashbrown 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.57 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"wasmer-clif-backend 0.4.2",
|
||||
@ -1565,7 +1565,7 @@ version = "0.4.2"
|
||||
dependencies = [
|
||||
"bindgen 0.46.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"cmake 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.57 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"regex 1.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"wasmer-runtime-core 0.4.2",
|
||||
"winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@ -1582,7 +1582,7 @@ version = "2.0.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.57 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -1656,13 +1656,13 @@ dependencies = [
|
||||
"checksum cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f"
|
||||
"checksum cmake 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)" = "2ca4386c8954b76a8415b63959337d940d724b336cabd3afe189c2b51a7e1ff0"
|
||||
"checksum constant_time_eq 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8ff012e225ce166d4422e0e78419d901719760f62ae2b7969ca6b564d1b54a9e"
|
||||
"checksum cranelift-bforest 0.30.0 (git+https://github.com/wasmerio/cranelift.git?branch=wasmer)" = "<none>"
|
||||
"checksum cranelift-codegen 0.30.0 (git+https://github.com/wasmerio/cranelift.git?branch=wasmer)" = "<none>"
|
||||
"checksum cranelift-codegen-meta 0.30.0 (git+https://github.com/wasmerio/cranelift.git?branch=wasmer)" = "<none>"
|
||||
"checksum cranelift-entity 0.30.0 (git+https://github.com/wasmerio/cranelift.git?branch=wasmer)" = "<none>"
|
||||
"checksum cranelift-frontend 0.30.0 (git+https://github.com/wasmerio/cranelift.git?branch=wasmer)" = "<none>"
|
||||
"checksum cranelift-native 0.30.0 (git+https://github.com/wasmerio/cranelift.git?branch=wasmer)" = "<none>"
|
||||
"checksum cranelift-wasm 0.30.0 (git+https://github.com/wasmerio/cranelift.git?branch=wasmer)" = "<none>"
|
||||
"checksum cranelift-bforest 0.30.0 (git+https://github.com/wasmerio/cranelift.git?rev=84ec31b0fdfc10db491ef950815ee2961db057cb)" = "<none>"
|
||||
"checksum cranelift-codegen 0.30.0 (git+https://github.com/wasmerio/cranelift.git?rev=84ec31b0fdfc10db491ef950815ee2961db057cb)" = "<none>"
|
||||
"checksum cranelift-codegen-meta 0.30.0 (git+https://github.com/wasmerio/cranelift.git?rev=84ec31b0fdfc10db491ef950815ee2961db057cb)" = "<none>"
|
||||
"checksum cranelift-entity 0.30.0 (git+https://github.com/wasmerio/cranelift.git?rev=84ec31b0fdfc10db491ef950815ee2961db057cb)" = "<none>"
|
||||
"checksum cranelift-frontend 0.30.0 (git+https://github.com/wasmerio/cranelift.git?rev=84ec31b0fdfc10db491ef950815ee2961db057cb)" = "<none>"
|
||||
"checksum cranelift-native 0.30.0 (git+https://github.com/wasmerio/cranelift.git?rev=84ec31b0fdfc10db491ef950815ee2961db057cb)" = "<none>"
|
||||
"checksum cranelift-wasm 0.30.0 (git+https://github.com/wasmerio/cranelift.git?rev=84ec31b0fdfc10db491ef950815ee2961db057cb)" = "<none>"
|
||||
"checksum criterion 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "0363053954f3e679645fc443321ca128b7b950a6fe288cf5f9335cc22ee58394"
|
||||
"checksum criterion-plot 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "76f9212ddf2f4a9eb2d401635190600656a1f88a932ef53d06e7fa4c7e02fb8e"
|
||||
"checksum crossbeam-deque 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f739f8c5363aca78cfb059edf753d8f0d36908c348f3d8d1503f03d8b75d9cf3"
|
||||
@ -1698,8 +1698,8 @@ dependencies = [
|
||||
"checksum itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "501266b7edd0174f8530248f87f99c88fbe60ca4ef3dd486835b8d8d53136f7f"
|
||||
"checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d"
|
||||
"checksum lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bc5729f27f159ddd61f4df6228e827e86643d4d3e7c32183cb30a1c08f604a14"
|
||||
"checksum libc 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)" = "42914d39aad277d9e176efbdad68acb1d5443ab65afe0e0e4f0d49352a950880"
|
||||
"checksum libloading 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9c3ad660d7cb8c5822cd83d10897b0f1f1526792737a179e73896152f85b88c2"
|
||||
"checksum libc 0.2.57 (registry+https://github.com/rust-lang/crates.io-index)" = "a844cabbd5a77e60403a58af576f0a1baa83c3dd2670be63e615bd24fc58b82d"
|
||||
"checksum libloading 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a5692f82b51823e27c4118b3e5c0d98aee9be90633ebc71ad12afef380b50219"
|
||||
"checksum llvm-sys 70.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3a2cb392cf218dbb2d2c4f0fe54b8622871f8897a1d62d24a117dcf540bba124"
|
||||
"checksum lock_api 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "62ebf1391f6acad60e5c8b43706dde4582df75c06698ab44511d15016bc2442c"
|
||||
"checksum log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c84ec4b527950aa83a329754b01dbe3f58361d1c5efacd1f6d68c494d08a17c6"
|
||||
@ -1754,16 +1754,16 @@ dependencies = [
|
||||
"checksum scroll_derive 0.9.5 (registry+https://github.com/rust-lang/crates.io-index)" = "8f1aa96c45e7f5a91cb7fabe7b279f02fea7126239fc40b732316e8b6a2d0fcb"
|
||||
"checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403"
|
||||
"checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3"
|
||||
"checksum serde 1.0.91 (registry+https://github.com/rust-lang/crates.io-index)" = "a72e9b96fa45ce22a4bc23da3858dfccfd60acd28a25bcd328a98fdd6bea43fd"
|
||||
"checksum serde 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)" = "32746bf0f26eab52f06af0d0aa1984f641341d06d8d673c693871da2d188c9be"
|
||||
"checksum serde-bench 0.0.7 (registry+https://github.com/rust-lang/crates.io-index)" = "d733da87e79faaac25616e33d26299a41143fd4cd42746cbb0e91d8feea243fd"
|
||||
"checksum serde_bytes 0.10.5 (registry+https://github.com/rust-lang/crates.io-index)" = "defbb8a83d7f34cc8380751eeb892b825944222888aff18996ea7901f24aec88"
|
||||
"checksum serde_derive 1.0.91 (registry+https://github.com/rust-lang/crates.io-index)" = "101b495b109a3e3ca8c4cbe44cf62391527cdfb6ba15821c5ce80bcd5ea23f9f"
|
||||
"checksum serde_derive 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)" = "46a3223d0c9ba936b61c0d2e3e559e3217dbfb8d65d06d26e8b3c25de38bae3e"
|
||||
"checksum serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)" = "5a23aa71d4a4d43fdbfaac00eff68ba8a06a51759a89ac3304323e800c4dd40d"
|
||||
"checksum smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)" = "c4488ae950c49d403731982257768f48fada354a5203fe81f9bb6f43ca9002be"
|
||||
"checksum stable_deref_trait 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dba1a27d3efae4351c8051072d619e3ade2820635c3958d826bfea39d59b54c8"
|
||||
"checksum strsim 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a"
|
||||
"checksum structopt 0.2.16 (registry+https://github.com/rust-lang/crates.io-index)" = "fa19a5a708e22bb5be31c1b6108a2a902f909c4b9ba85cba44c06632386bc0ff"
|
||||
"checksum structopt-derive 0.2.16 (registry+https://github.com/rust-lang/crates.io-index)" = "c6d59d0ae8ef8de16e49e3ca7afa16024a3e0dfd974a75ef93fdc5464e34523f"
|
||||
"checksum structopt 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)" = "c767a8971f53d7324583085deee2e230903be09e52fb27df9af94c5cb2b43c31"
|
||||
"checksum structopt-derive 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)" = "c57a30c87454ced2186f62f940e981746e8cbbe026d52090c8c4352b636f8235"
|
||||
"checksum syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)" = "d3b891b9015c88c576343b9b3e41c2c11a51c219ef067b264bd9c8aa9b441dad"
|
||||
"checksum syn 0.15.34 (registry+https://github.com/rust-lang/crates.io-index)" = "a1393e4a97a19c01e900df2aec855a29f71cf02c402e2f443b8d2747c25c5dbe"
|
||||
"checksum synom 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a393066ed9010ebaed60b9eafa373d4b1baac186dd7e008555b0f702b51945b6"
|
||||
|
1
Makefile
1
Makefile
@ -51,6 +51,7 @@ test:
|
||||
cargo test --all --exclude wasmer-runtime-c-api --exclude wasmer-emscripten --exclude wasmer-spectests --exclude wasmer-singlepass-backend --exclude wasmer-wasi -- $(runargs)
|
||||
# cargo test --all --exclude wasmer-emscripten -- --test-threads=1 $(runargs)
|
||||
cargo test --manifest-path lib/spectests/Cargo.toml --features clif
|
||||
@if [ ! -z "${CIRCLE_JOB}" ]; then rm -f /home/circleci/project/target/debug/deps/libcranelift_wasm* && rm -f /Users/distiller/project/target/debug/deps/libcranelift_wasm*; fi;
|
||||
cargo test --manifest-path lib/spectests/Cargo.toml --features llvm
|
||||
cargo test --manifest-path lib/runtime/Cargo.toml --features llvm
|
||||
cargo build -p wasmer-runtime-c-api
|
||||
|
@ -9,11 +9,11 @@ edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
wasmer-runtime-core = { path = "../runtime-core", version = "0.4.2" }
|
||||
cranelift-native = { git = "https://github.com/wasmerio/cranelift.git", branch = "wasmer" }
|
||||
cranelift-codegen = { git = "https://github.com/wasmerio/cranelift.git", branch = "wasmer" }
|
||||
cranelift-entity = { git = "https://github.com/wasmerio/cranelift.git", branch = "wasmer" }
|
||||
cranelift-frontend = { git = "https://github.com/wasmerio/cranelift.git", branch = "wasmer" }
|
||||
cranelift-wasm = { git = "https://github.com/wasmerio/cranelift.git", branch = "wasmer" }
|
||||
cranelift-native = { git = "https://github.com/wasmerio/cranelift.git", rev = "84ec31b0fdfc10db491ef950815ee2961db057cb" }
|
||||
cranelift-codegen = { git = "https://github.com/wasmerio/cranelift.git", rev = "84ec31b0fdfc10db491ef950815ee2961db057cb" }
|
||||
cranelift-entity = { git = "https://github.com/wasmerio/cranelift.git", rev = "84ec31b0fdfc10db491ef950815ee2961db057cb" }
|
||||
cranelift-frontend = { git = "https://github.com/wasmerio/cranelift.git", rev = "84ec31b0fdfc10db491ef950815ee2961db057cb" }
|
||||
cranelift-wasm = { git = "https://github.com/wasmerio/cranelift.git", rev = "84ec31b0fdfc10db491ef950815ee2961db057cb" }
|
||||
hashbrown = "0.1"
|
||||
target-lexicon = "0.4.0"
|
||||
wasmparser = "0.29.2"
|
||||
|
@ -113,3 +113,54 @@ impl Cache for FileSystemCache {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(all(test, not(feature = "singlepass")))]
|
||||
mod tests {
|
||||
|
||||
use super::*;
|
||||
use std::env;
|
||||
|
||||
#[test]
|
||||
fn test_file_system_cache_run() {
|
||||
use crate::{compile, imports, Func};
|
||||
use wabt::wat2wasm;
|
||||
|
||||
static WAT: &'static str = r#"
|
||||
(module
|
||||
(type $t0 (func (param i32) (result i32)))
|
||||
(func $add_one (export "add_one") (type $t0) (param $p0 i32) (result i32)
|
||||
get_local $p0
|
||||
i32.const 1
|
||||
i32.add))
|
||||
"#;
|
||||
|
||||
let wasm = wat2wasm(WAT).unwrap();
|
||||
|
||||
let module = compile(&wasm).unwrap();
|
||||
|
||||
let cache_dir = env::temp_dir();
|
||||
println!("test temp_dir {:?}", cache_dir);
|
||||
|
||||
let mut fs_cache = unsafe {
|
||||
FileSystemCache::new(cache_dir)
|
||||
.map_err(|e| format!("Cache error: {:?}", e))
|
||||
.unwrap()
|
||||
};
|
||||
// store module
|
||||
let key = WasmHash::generate(&wasm);
|
||||
fs_cache.store(key, module.clone()).unwrap();
|
||||
|
||||
// load module
|
||||
let cached_module = fs_cache.load(key).unwrap();
|
||||
|
||||
let import_object = imports! {};
|
||||
let instance = cached_module.instantiate(&import_object).unwrap();
|
||||
let add_one: Func<i32, i32> = instance.func("add_one").unwrap();
|
||||
|
||||
let value = add_one.call(42).unwrap();
|
||||
|
||||
// verify it works
|
||||
assert_eq!(value, 43);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -58,6 +58,8 @@ pub fn compile(file: &str, ignores: &HashSet<String>) -> Option<String> {
|
||||
let result = Command::new(&normalized_name)
|
||||
.output()
|
||||
.expect("Failed to execute native program");
|
||||
|
||||
std::fs::remove_file(&normalized_name).expect("could not delete executable");
|
||||
let wasm_out_name = format!("{}.wasm", &normalized_name);
|
||||
|
||||
Command::new("rustc")
|
||||
@ -76,25 +78,31 @@ pub fn compile(file: &str, ignores: &HashSet<String>) -> Option<String> {
|
||||
};
|
||||
|
||||
let src_code = fs::read_to_string(file).expect("read src file");
|
||||
let args = extract_args_from_source_file(&src_code);
|
||||
let args = extract_args_from_source_file(&src_code).unwrap_or_default();
|
||||
|
||||
let mapdir_args = if let Some(a) = args {
|
||||
if !a.mapdir.is_empty() {
|
||||
let mut out_str = String::new();
|
||||
out_str.push_str("vec![");
|
||||
for (alias, real_dir) in a.mapdir {
|
||||
out_str.push_str(&format!(
|
||||
"(\"{}\".to_string(), \"{}\".to_string()),",
|
||||
alias, real_dir
|
||||
));
|
||||
}
|
||||
out_str.push_str("]");
|
||||
out_str
|
||||
} else {
|
||||
"vec![]".to_string()
|
||||
let mapdir_args = {
|
||||
let mut out_str = String::new();
|
||||
out_str.push_str("vec![");
|
||||
for (alias, real_dir) in args.mapdir {
|
||||
out_str.push_str(&format!(
|
||||
"(\"{}\".to_string(), \"{}\".to_string()),",
|
||||
alias, real_dir
|
||||
));
|
||||
}
|
||||
} else {
|
||||
"vec![]".to_string()
|
||||
out_str.push_str("]");
|
||||
out_str
|
||||
};
|
||||
|
||||
let envvar_args = {
|
||||
let mut out_str = String::new();
|
||||
out_str.push_str("vec![");
|
||||
|
||||
for entry in args.envvars {
|
||||
out_str.push_str(&format!("\"{}={}\".to_string(),", entry.0, entry.1));
|
||||
}
|
||||
|
||||
out_str.push_str("]");
|
||||
out_str
|
||||
};
|
||||
|
||||
let contents = format!(
|
||||
@ -104,6 +112,7 @@ fn test_{rs_module_name}() {{
|
||||
\"../../{module_path}\",
|
||||
\"{rs_module_name}\",
|
||||
{mapdir_args},
|
||||
{envvar_args},
|
||||
\"../../{test_output_path}\"
|
||||
);
|
||||
}}
|
||||
@ -113,6 +122,7 @@ fn test_{rs_module_name}() {{
|
||||
rs_module_name = rs_module_name,
|
||||
test_output_path = format!("{}.out", normalized_name),
|
||||
mapdir_args = mapdir_args,
|
||||
envvar_args = envvar_args
|
||||
);
|
||||
let rust_test_filepath = format!(
|
||||
concat!(env!("CARGO_MANIFEST_DIR"), "/tests/{}.rs"),
|
||||
@ -167,14 +177,16 @@ fn read_ignore_list() -> HashSet<String> {
|
||||
.collect()
|
||||
}
|
||||
|
||||
#[derive(Debug, Default)]
|
||||
struct Args {
|
||||
pub mapdir: Vec<(String, String)>,
|
||||
pub envvars: Vec<(String, String)>,
|
||||
}
|
||||
|
||||
/// Pulls args to the program out of a comment at the top of the file starting with "// Args:"
|
||||
fn extract_args_from_source_file(source_code: &str) -> Option<Args> {
|
||||
if source_code.starts_with("// Args:") {
|
||||
let mut args = Args { mapdir: vec![] };
|
||||
let mut args = Args::default();
|
||||
for arg_line in source_code
|
||||
.lines()
|
||||
.skip(1)
|
||||
@ -196,6 +208,13 @@ fn extract_args_from_source_file(source_code: &str) -> Option<Args> {
|
||||
);
|
||||
}
|
||||
}
|
||||
"env" => {
|
||||
if let [name, val] = &tokenized[2].split('=').collect::<Vec<&str>>()[..] {
|
||||
args.envvars.push((name.to_string(), val.to_string()));
|
||||
} else {
|
||||
eprintln!("Parse error in env {} not parsed correctly", &tokenized[2]);
|
||||
}
|
||||
}
|
||||
e => {
|
||||
eprintln!("WARN: comment arg: {} is not supported", e);
|
||||
}
|
||||
|
@ -195,7 +195,13 @@ pub fn clock_time_get(
|
||||
let memory = ctx.memory(0);
|
||||
|
||||
let out_addr = wasi_try!(time.deref(memory));
|
||||
platform_clock_time_get(clock_id, precision, out_addr)
|
||||
let result = platform_clock_time_get(clock_id, precision, out_addr);
|
||||
debug!(
|
||||
"time: {} => {}",
|
||||
wasi_try!(time.deref(memory)).get(),
|
||||
result
|
||||
);
|
||||
result
|
||||
}
|
||||
|
||||
/// ### `environ_get()`
|
||||
@ -215,7 +221,7 @@ pub fn environ_get(
|
||||
let state = get_wasi_state(ctx);
|
||||
let memory = ctx.memory(0);
|
||||
|
||||
write_buffer_array(memory, &*state.args, environ, environ_buf)
|
||||
write_buffer_array(memory, &*state.envs, environ, environ_buf)
|
||||
}
|
||||
|
||||
/// ### `environ_sizes_get()`
|
||||
@ -238,8 +244,15 @@ pub fn environ_sizes_get(
|
||||
|
||||
let state = get_wasi_state(ctx);
|
||||
|
||||
environ_count.set(state.envs.len() as u32);
|
||||
environ_buf_size.set(state.envs.iter().map(|v| v.len() as u32).sum());
|
||||
let env_var_count = state.envs.len() as u32;
|
||||
let env_buf_size = state.envs.iter().map(|v| v.len() as u32 + 1).sum();
|
||||
environ_count.set(env_var_count);
|
||||
environ_buf_size.set(env_buf_size);
|
||||
|
||||
debug!(
|
||||
"env_var_count: {}, env_buf_size: {}",
|
||||
env_var_count, env_buf_size
|
||||
);
|
||||
|
||||
__WASI_ESUCCESS
|
||||
}
|
||||
@ -1665,7 +1678,7 @@ pub fn proc_raise(ctx: &mut Ctx, sig: __wasi_signal_t) -> __wasi_errno_t {
|
||||
/// - `size_t buf_len`
|
||||
/// The number of bytes that will be written
|
||||
pub fn random_get(ctx: &mut Ctx, buf: WasmPtr<u8, Array>, buf_len: u32) -> __wasi_errno_t {
|
||||
debug!("wasi::random_get");
|
||||
debug!("wasi::random_get buf_len: {}", buf_len);
|
||||
let mut rng = thread_rng();
|
||||
let memory = ctx.memory(0);
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
macro_rules! assert_wasi_output {
|
||||
($file:expr, $name:expr, $mapdir_args:expr, $expected:expr) => {{
|
||||
($file:expr, $name:expr, $mapdir_args:expr, $envvar_args:expr, $expected:expr) => {{
|
||||
use wasmer_dev_utils::stdio::StdioCapturer;
|
||||
use wasmer_runtime_core::{backend::Compiler, Func};
|
||||
use wasmer_wasi::generate_import_object;
|
||||
|
@ -5,6 +5,7 @@ fn test_create_dir() {
|
||||
"../../wasitests/create_dir.wasm",
|
||||
"create_dir",
|
||||
vec![],
|
||||
vec![],
|
||||
"../../wasitests/create_dir.out"
|
||||
);
|
||||
}
|
||||
|
10
lib/wasi/tests/wasitests/envvar.rs
Normal file
10
lib/wasi/tests/wasitests/envvar.rs
Normal file
@ -0,0 +1,10 @@
|
||||
#[test]
|
||||
fn test_envvar() {
|
||||
assert_wasi_output!(
|
||||
"../../wasitests/envvar.wasm",
|
||||
"envvar",
|
||||
vec![],
|
||||
vec![],
|
||||
"../../wasitests/envvar.out"
|
||||
);
|
||||
}
|
@ -4,6 +4,7 @@ fn test_file_metadata() {
|
||||
"../../wasitests/file_metadata.wasm",
|
||||
"file_metadata",
|
||||
vec![],
|
||||
vec![],
|
||||
"../../wasitests/file_metadata.out"
|
||||
);
|
||||
}
|
||||
|
@ -4,6 +4,7 @@ fn test_fs_sandbox_test() {
|
||||
"../../wasitests/fs_sandbox_test.wasm",
|
||||
"fs_sandbox_test",
|
||||
vec![],
|
||||
vec![],
|
||||
"../../wasitests/fs_sandbox_test.out"
|
||||
);
|
||||
}
|
||||
|
@ -4,6 +4,7 @@ fn test_hello() {
|
||||
"../../wasitests/hello.wasm",
|
||||
"hello",
|
||||
vec![],
|
||||
vec![],
|
||||
"../../wasitests/hello.out"
|
||||
);
|
||||
}
|
||||
|
@ -4,6 +4,7 @@ fn test_mapdir() {
|
||||
"../../wasitests/mapdir.wasm",
|
||||
"mapdir",
|
||||
vec![],
|
||||
vec![],
|
||||
"../../wasitests/mapdir.out"
|
||||
);
|
||||
}
|
||||
|
@ -6,6 +6,7 @@
|
||||
#[macro_use]
|
||||
mod _common;
|
||||
mod create_dir;
|
||||
mod envvar;
|
||||
mod file_metadata;
|
||||
mod fs_sandbox_test;
|
||||
mod hello;
|
||||
|
@ -4,6 +4,7 @@ fn test_quine() {
|
||||
"../../wasitests/quine.wasm",
|
||||
"quine",
|
||||
vec![],
|
||||
vec![],
|
||||
"../../wasitests/quine.out"
|
||||
);
|
||||
}
|
||||
|
Binary file not shown.
Binary file not shown.
6
lib/wasi/wasitests/envvar.out
Normal file
6
lib/wasi/wasitests/envvar.out
Normal file
@ -0,0 +1,6 @@
|
||||
Env vars:
|
||||
CAT=2
|
||||
DOG=1
|
||||
DOG Ok("1")
|
||||
DOG_TYPE Err(NotPresent)
|
||||
SET VAR Ok("HELLO")
|
38
lib/wasi/wasitests/envvar.rs
Normal file
38
lib/wasi/wasitests/envvar.rs
Normal file
@ -0,0 +1,38 @@
|
||||
// Args:
|
||||
// env: DOG=1
|
||||
// env: CAT=2
|
||||
|
||||
use std::env;
|
||||
|
||||
fn get_env_var(var_name: &str) -> Result<String, env::VarError> {
|
||||
#[cfg(not(target = "wasi"))]
|
||||
match var_name {
|
||||
"DOG" => Ok("1".to_string()),
|
||||
"CAT" => Ok("2".to_string()),
|
||||
_ => Err(env::VarError::NotPresent),
|
||||
}
|
||||
#[cfg(target = "wasi")]
|
||||
env::var(var_name)
|
||||
}
|
||||
|
||||
fn main() {
|
||||
#[cfg(not(target = "wasi"))]
|
||||
let mut env_vars = vec!["DOG=1".to_string(), "CAT=2".to_string()];
|
||||
#[cfg(target = "wasi")]
|
||||
let mut env_vars = env::vars()
|
||||
.map(|(key, value)| format!("{}={}", key, value))
|
||||
.collect::<Vec<String>>();
|
||||
|
||||
env_vars.sort();
|
||||
|
||||
println!("Env vars:");
|
||||
for e in env_vars {
|
||||
println!("{}", e);
|
||||
}
|
||||
|
||||
env::set_var("WASI_ENVVAR_TEST", "HELLO");
|
||||
|
||||
println!("DOG {:?}", get_env_var("DOG"));
|
||||
println!("DOG_TYPE {:?}", get_env_var("DOG_TYPE"));
|
||||
println!("SET VAR {:?}", env::var("WASI_ENVVAR_TEST"));
|
||||
}
|
BIN
lib/wasi/wasitests/envvar.wasm
Executable file
BIN
lib/wasi/wasitests/envvar.wasm
Executable file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -19,7 +19,6 @@ use wasmer_clif_backend::CraneliftCompiler;
|
||||
use wasmer_llvm_backend::{
|
||||
code::LLVMModuleCodeGenerator,
|
||||
};
|
||||
use wasmer_middleware_common::metering::Metering;
|
||||
use wasmer_runtime::{
|
||||
cache::{Cache as BaseCache, FileSystemCache, WasmHash, WASMER_VERSION_HASH},
|
||||
error::RuntimeError,
|
||||
@ -106,6 +105,10 @@ struct Run {
|
||||
#[structopt(long = "mapdir", multiple = true)]
|
||||
mapped_dirs: Vec<String>,
|
||||
|
||||
/// Pass custom environment variables
|
||||
#[structopt(long = "env", multiple = true)]
|
||||
env_vars: Vec<String>,
|
||||
|
||||
/// Custom code loader
|
||||
#[structopt(
|
||||
long = "loader",
|
||||
@ -231,6 +234,47 @@ fn get_cache_dir() -> PathBuf {
|
||||
}
|
||||
}
|
||||
|
||||
fn get_mapped_dirs(input: &[String]) -> Result<Vec<(String, PathBuf)>, String> {
|
||||
let mut md = vec![];
|
||||
for entry in input.iter() {
|
||||
if let [alias, real_dir] = entry.split(':').collect::<Vec<&str>>()[..] {
|
||||
let pb = PathBuf::from(&real_dir);
|
||||
if let Ok(pb_metadata) = pb.metadata() {
|
||||
if !pb_metadata.is_dir() {
|
||||
return Err(format!(
|
||||
"\"{}\" exists, but it is not a directory",
|
||||
&real_dir
|
||||
));
|
||||
}
|
||||
} else {
|
||||
return Err(format!("Directory \"{}\" does not exist", &real_dir));
|
||||
}
|
||||
md.push((alias.to_string(), pb));
|
||||
continue;
|
||||
}
|
||||
return Err(format!(
|
||||
"Directory mappings must consist of two paths separate by a colon. Found {}",
|
||||
&entry
|
||||
));
|
||||
}
|
||||
Ok(md)
|
||||
}
|
||||
|
||||
fn get_env_var_args(input: &[String]) -> Result<Vec<(&str, &str)>, String> {
|
||||
let mut ev = vec![];
|
||||
for entry in input.iter() {
|
||||
if let [env_var, value] = entry.split('=').collect::<Vec<&str>>()[..] {
|
||||
ev.push((env_var, value));
|
||||
} else {
|
||||
return Err(format!(
|
||||
"Env vars must be of the form <var_name>=<value>. Found {}",
|
||||
&entry
|
||||
));
|
||||
}
|
||||
}
|
||||
Ok(ev)
|
||||
}
|
||||
|
||||
/// Execute a wasm/wat file
|
||||
fn execute_wasm(options: &Run) -> Result<(), String> {
|
||||
// force disable caching on windows
|
||||
@ -239,31 +283,8 @@ fn execute_wasm(options: &Run) -> Result<(), String> {
|
||||
#[cfg(not(target_os = "windows"))]
|
||||
let disable_cache = options.disable_cache;
|
||||
|
||||
let mapped_dirs = {
|
||||
let mut md = vec![];
|
||||
for entry in options.mapped_dirs.iter() {
|
||||
if let &[alias, real_dir] = &entry.split(':').collect::<Vec<&str>>()[..] {
|
||||
let pb = PathBuf::from(&real_dir);
|
||||
if let Ok(pb_metadata) = pb.metadata() {
|
||||
if !pb_metadata.is_dir() {
|
||||
return Err(format!(
|
||||
"\"{}\" exists, but it is not a directory",
|
||||
&real_dir
|
||||
));
|
||||
}
|
||||
} else {
|
||||
return Err(format!("Directory \"{}\" does not exist", &real_dir));
|
||||
}
|
||||
md.push((alias.to_string(), pb));
|
||||
continue;
|
||||
}
|
||||
return Err(format!(
|
||||
"Directory mappings must consist of two paths separate by a colon. Found {}",
|
||||
&entry
|
||||
));
|
||||
}
|
||||
md
|
||||
};
|
||||
let mapped_dirs = get_mapped_dirs(&options.mapped_dirs[..])?;
|
||||
let env_vars = get_env_var_args(&options.env_vars[..])?;
|
||||
let wasm_path = &options.path;
|
||||
|
||||
let mut wasm_binary: Vec<u8> = read_file_contents(wasm_path).map_err(|err| {
|
||||
@ -290,9 +311,10 @@ fn execute_wasm(options: &Run) -> Result<(), String> {
|
||||
let num_str = if let Some(ns) = split.next() {
|
||||
ns
|
||||
} else {
|
||||
return Err(format!(
|
||||
return Err(
|
||||
"Can't parse symbol map (expected each entry to be of the form: `0:func_name`)"
|
||||
));
|
||||
.to_string(),
|
||||
);
|
||||
};
|
||||
let num: u32 = num_str.parse::<u32>().map_err(|err| {
|
||||
format!(
|
||||
@ -303,9 +325,10 @@ fn execute_wasm(options: &Run) -> Result<(), String> {
|
||||
let name_str: String = if let Some(name_str) = split.next() {
|
||||
name_str
|
||||
} else {
|
||||
return Err(format!(
|
||||
return Err(
|
||||
"Can't parse symbol map (expected each entry to be of the form: `0:func_name`)"
|
||||
));
|
||||
.to_string(),
|
||||
);
|
||||
}
|
||||
.to_owned();
|
||||
|
||||
@ -401,7 +424,7 @@ fn execute_wasm(options: &Run) -> Result<(), String> {
|
||||
// cache.load will return the Module if it's able to deserialize it properly, and an error if:
|
||||
// * The file is not found
|
||||
// * The file exists, but it's corrupted or can't be converted to a module
|
||||
let module = match cache.load(hash) {
|
||||
match cache.load(hash) {
|
||||
Ok(module) => {
|
||||
// We are able to load the module from cache
|
||||
module
|
||||
@ -421,8 +444,7 @@ fn execute_wasm(options: &Run) -> Result<(), String> {
|
||||
|
||||
module
|
||||
}
|
||||
};
|
||||
module
|
||||
}
|
||||
};
|
||||
|
||||
if let Some(loader) = options.loader {
|
||||
@ -497,7 +519,8 @@ fn execute_wasm(options: &Run) -> Result<(), String> {
|
||||
.cloned()
|
||||
.map(|arg| arg.into_bytes())
|
||||
.collect(),
|
||||
env::vars()
|
||||
env_vars
|
||||
.into_iter()
|
||||
.map(|(k, v)| format!("{}={}", k, v).into_bytes())
|
||||
.collect(),
|
||||
options.pre_opened_directories.clone(),
|
||||
|
Loading…
Reference in New Issue
Block a user