mirror of
https://github.com/fluencelabs/wasmer
synced 2025-06-23 13:41:32 +00:00
framebuffer wip
This commit is contained in:
259
Cargo.lock
generated
259
Cargo.lock
generated
@ -90,7 +90,7 @@ dependencies = [
|
||||
"clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"env_logger 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"fxhash 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"peeking_take_while 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@ -120,7 +120,7 @@ name = "bstr"
|
||||
version = "0.2.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"regex-automata 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 1.0.99 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@ -136,7 +136,7 @@ name = "c2-chacha"
|
||||
version = "0.2.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ppv-lite86 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
@ -260,7 +260,7 @@ name = "colored"
|
||||
version = "1.8.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winconsole 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
@ -325,7 +325,7 @@ dependencies = [
|
||||
"criterion-plot 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"csv 1.1.1 (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)",
|
||||
"lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.62 (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)",
|
||||
@ -367,7 +367,7 @@ dependencies = [
|
||||
"arrayvec 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"memoffset 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"scopeguard 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
@ -386,7 +386,7 @@ version = "0.6.6"
|
||||
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)",
|
||||
"lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -424,7 +424,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"bitflags 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"owning_ref 0.3.3 (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.13 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@ -529,6 +529,15 @@ name = "gcc"
|
||||
version = "0.3.55"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "gdi32-sys"
|
||||
version = "0.1.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "generational-arena"
|
||||
version = "0.2.2"
|
||||
@ -612,7 +621,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=llvm8-0)",
|
||||
"lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"llvm-sys 80.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"regex 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@ -657,7 +666,12 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "lazy_static"
|
||||
version = "1.3.0"
|
||||
version = "0.2.11"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "lazy_static"
|
||||
version = "1.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
@ -680,7 +694,7 @@ version = "80.1.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"cc 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"regex 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@ -736,6 +750,21 @@ dependencies = [
|
||||
"rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "minifb"
|
||||
version = "0.11.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"cc 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"gdi32-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"orbclient 0.3.27 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"user32-sys 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"x11-dl 2.14.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "nix"
|
||||
version = "0.15.0"
|
||||
@ -762,6 +791,35 @@ dependencies = [
|
||||
"version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "num"
|
||||
version = "0.1.42"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"num-integer 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"num-iter 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "num-integer"
|
||||
version = "0.1.41"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"autocfg 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "num-iter"
|
||||
version = "0.1.39"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"autocfg 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"num-integer 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "num-traits"
|
||||
version = "0.1.43"
|
||||
@ -786,6 +844,15 @@ dependencies = [
|
||||
"libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "orbclient"
|
||||
version = "0.3.27"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"sdl2 0.32.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "owning_ref"
|
||||
version = "0.3.3"
|
||||
@ -833,6 +900,11 @@ name = "peeking_take_while"
|
||||
version = "0.1.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "pkg-config"
|
||||
version = "0.3.15"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "plain"
|
||||
version = "0.2.3"
|
||||
@ -901,6 +973,24 @@ dependencies = [
|
||||
"winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rand"
|
||||
version = "0.6.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"autocfg 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.62 (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.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rand_hc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rand_isaac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rand_jitter 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rand_os 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rand_pcg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rand_xorshift 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rand"
|
||||
version = "0.7.0"
|
||||
@ -913,6 +1003,15 @@ dependencies = [
|
||||
"rand_hc 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rand_chacha"
|
||||
version = "0.1.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"autocfg 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rand_chacha"
|
||||
version = "0.2.1"
|
||||
@ -943,6 +1042,14 @@ dependencies = [
|
||||
"getrandom 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rand_hc"
|
||||
version = "0.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rand_hc"
|
||||
version = "0.2.0"
|
||||
@ -951,6 +1058,24 @@ dependencies = [
|
||||
"rand_core 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rand_isaac"
|
||||
version = "0.1.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rand_jitter"
|
||||
version = "0.1.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rand_os"
|
||||
version = "0.1.3"
|
||||
@ -964,6 +1089,23 @@ dependencies = [
|
||||
"winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rand_pcg"
|
||||
version = "0.1.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"autocfg 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rand_xorshift"
|
||||
version = "0.1.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rand_xoshiro"
|
||||
version = "0.1.0"
|
||||
@ -1001,7 +1143,7 @@ dependencies = [
|
||||
"crossbeam-deque 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"crossbeam-queue 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"num_cpus 1.10.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
@ -1018,6 +1160,11 @@ name = "redox_syscall"
|
||||
version = "0.1.56"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "ref_thread_local"
|
||||
version = "0.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "regex"
|
||||
version = "1.2.1"
|
||||
@ -1105,6 +1252,28 @@ dependencies = [
|
||||
"syn 0.15.44 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "sdl2"
|
||||
version = "0.32.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"bitflags 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"num 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"sdl2-sys 0.32.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "sdl2-sys"
|
||||
version = "0.32.6"
|
||||
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.62 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "semver"
|
||||
version = "0.9.0"
|
||||
@ -1301,7 +1470,7 @@ name = "thread_local"
|
||||
version = "0.3.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -1369,6 +1538,15 @@ name = "unicode-xid"
|
||||
version = "0.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "user32-sys"
|
||||
version = "0.1.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "vec_map"
|
||||
version = "0.8.1"
|
||||
@ -1441,6 +1619,7 @@ dependencies = [
|
||||
"wasmer-runtime-core 0.6.0",
|
||||
"wasmer-singlepass-backend 0.6.0",
|
||||
"wasmer-wasi 0.6.0",
|
||||
"wasmer-wasi-framebuffer 0.6.0",
|
||||
"wasmer-wasi-tests 0.6.0",
|
||||
]
|
||||
|
||||
@ -1504,7 +1683,7 @@ name = "wasmer-emscripten"
|
||||
version = "0.6.0"
|
||||
dependencies = [
|
||||
"byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rand 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@ -1541,7 +1720,7 @@ dependencies = [
|
||||
"cc 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"goblin 0.0.24 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"inkwell 0.1.0 (git+https://github.com/wasmerio/inkwell?branch=llvm8-0)",
|
||||
"lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"nix 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"regex 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@ -1571,7 +1750,7 @@ name = "wasmer-runtime"
|
||||
version = "0.6.0"
|
||||
dependencies = [
|
||||
"criterion 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"memmap 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"wabt 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@ -1604,7 +1783,7 @@ dependencies = [
|
||||
"field-offset 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"hex 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"indexmap 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"nix 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"page_size 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@ -1627,7 +1806,7 @@ dependencies = [
|
||||
"colored 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"dynasm 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"dynasmrt 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"nix 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"smallvec 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@ -1661,6 +1840,16 @@ dependencies = [
|
||||
"winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wasmer-wasi-framebuffer"
|
||||
version = "0.6.0"
|
||||
dependencies = [
|
||||
"minifb 0.11.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ref_thread_local 0.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"wasmer-runtime-core 0.6.0",
|
||||
"wasmer-wasi 0.6.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wasmer-wasi-tests"
|
||||
version = "0.6.0"
|
||||
@ -1752,11 +1941,21 @@ version = "0.10.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"cgmath 0.16.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rgb 0.8.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "x11-dl"
|
||||
version = "2.14.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"pkg-config 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[metadata]
|
||||
"checksum aho-corasick 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)" = "58fb5e95d83b38284460a5fda7d6470aa0b8844d283a0b614b8535e880800d2d"
|
||||
"checksum ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b"
|
||||
@ -1816,6 +2015,7 @@ dependencies = [
|
||||
"checksum fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba"
|
||||
"checksum fxhash 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c"
|
||||
"checksum gcc 0.3.55 (registry+https://github.com/rust-lang/crates.io-index)" = "8f5f3913fa0bfe7ee1fd8248b6b9f42a5af4b9d65ec2dd2c3c26132b950ecfc2"
|
||||
"checksum gdi32-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "8e3eb92c1107527888f86b6ebb0b7f82794777dbf172a932998660a0a2e26c11"
|
||||
"checksum generational-arena 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4024f96ffa0ebaaf36aa589cd41f2fd69f3a5e6fd02c86e11e12cdf41d5b46a3"
|
||||
"checksum generic-array 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)" = "c68f0274ae0e023facc3c97b2e00f076be70e254bc851d972503b328db79b2ec"
|
||||
"checksum getrandom 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "6171a6cc63fbabbe27c2b5ee268e8b7fe5dc1eb0dd2dfad537c1dfed6f69117e"
|
||||
@ -1831,7 +2031,8 @@ dependencies = [
|
||||
"checksum itertools 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5b8467d9c1cebe26feb08c640139247fac215782d35371ade9a2136ed6085358"
|
||||
"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 lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "76f033c7ad61445c5b347c7382dd1237847eb1bce590fe50365dcb33d546be73"
|
||||
"checksum lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
|
||||
"checksum libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)" = "34fcd2c08d2f832f376f4173a231990fa5aef4e99fb569867318a227ef4c06ba"
|
||||
"checksum libloading 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f2b111a074963af1d37a139918ac6d49ad1d0d5e47f72fd55388619691a7d753"
|
||||
"checksum llvm-sys 80.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2110cd4daf9cd8e39dd3b933b1a2a2ac7315e91f7c92b3a20beab526c63b5978"
|
||||
@ -1841,17 +2042,23 @@ dependencies = [
|
||||
"checksum memmap 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e2ffa2c986de11a9df78620c01eeaaf27d94d3ff02bf81bfcca953102dd0c6ff"
|
||||
"checksum memmap 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6585fd95e7bb50d6cc31e20d4cf9afb4e2ba16c5846fc76793f11218da9c475b"
|
||||
"checksum memoffset 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ce6075db033bbbb7ee5a0bbd3a3186bbae616f57fb001c485c7ff77955f8177f"
|
||||
"checksum minifb 0.11.2 (registry+https://github.com/rust-lang/crates.io-index)" = "85c2cedede43aad485232acf318a3e191ee5a3c2250ca8a3556b849a48e8b901"
|
||||
"checksum nix 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3b2e0b4f3320ed72aaedb9a5ac838690a8047c7b275da22711fddff4f8a14229"
|
||||
"checksum nodrop 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "2f9667ddcc6cc8a43afc9b7917599d7216aa09c463919ea32c59ed6cac8bc945"
|
||||
"checksum nom 4.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2ad2a91a8e869eeb30b9cb3119ae87773a8f4ae617f41b1eb9c154b2905f7bd6"
|
||||
"checksum num 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "4703ad64153382334aa8db57c637364c322d3372e097840c72000dabdcf6156e"
|
||||
"checksum num-integer 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)" = "b85e541ef8255f6cf42bbfe4ef361305c6c135d10919ecc26126c4e5ae94bc09"
|
||||
"checksum num-iter 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)" = "76bd5272412d173d6bf9afdf98db8612bbabc9a7a830b7bfc9c188911716132e"
|
||||
"checksum num-traits 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)" = "92e5113e9fd4cc14ded8e499429f396a20f98c772a47cc8622a736e1ec843c31"
|
||||
"checksum num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "6ba9a427cfca2be13aa6f6403b0b7e7368fe982bfa16fccc450ce74c46cd9b32"
|
||||
"checksum num_cpus 1.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "bcef43580c035376c0705c42792c294b66974abbfd2789b511784023f71f3273"
|
||||
"checksum orbclient 0.3.27 (registry+https://github.com/rust-lang/crates.io-index)" = "f8b18f57ab94fbd058e30aa57f712ec423c0bb7403f8493a6c58eef0c36d9402"
|
||||
"checksum owning_ref 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "cdf84f41639e037b484f93433aa3897863b561ed65c6e59c7073d7c561710f37"
|
||||
"checksum page_size 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f89ef58b3d32420dbd1a43d2f38ae92f6239ef12bb556ab09ca55445f5a67242"
|
||||
"checksum parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f842b1982eb6c2fe34036a4fbfb06dd185a3f5c8edfaacdf7d1ea10b07de6252"
|
||||
"checksum parking_lot_core 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b876b1b9e7ac6e1a74a6da34d25c42e17e8862aa409cbbbdcfc8d86c6f3bc62b"
|
||||
"checksum peeking_take_while 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099"
|
||||
"checksum pkg-config 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)" = "a7c1d2cfa5a714db3b5f24f0915e74fcdf91d09d496ba61329705dda7774d2af"
|
||||
"checksum plain 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "b4596b6d070b27117e987119b4dac604f3c58cfb0b191112e24771b2faeac1a6"
|
||||
"checksum ppv-lite86 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "e3cbf9f658cdb5000fcf6f362b8ea2ba154b9f146a61c7a20d647034c6b6561b"
|
||||
"checksum proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)" = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759"
|
||||
@ -1861,19 +2068,27 @@ dependencies = [
|
||||
"checksum quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)" = "6ce23b6b870e8f94f81fb0a363d65d86675884b34a09043c81e5562f11c1f8e1"
|
||||
"checksum quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "053a8c8bcc71fcce321828dc897a98ab9760bef03a4fc36693c231e5b3216cfe"
|
||||
"checksum rand 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "552840b97013b1a26992c11eac34bdd778e464601a4c2054b5f0bff7c6761293"
|
||||
"checksum rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)" = "6d71dacdc3c88c1fde3885a3be3fbab9f35724e6ce99467f7d9c5026132184ca"
|
||||
"checksum rand 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d47eab0e83d9693d40f825f86948aa16eff6750ead4bdffc4ab95b8b3a7f052c"
|
||||
"checksum rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "556d3a1ca6600bfcbab7c7c91ccb085ac7fbbcd70e008a98742e7847f4f7bcef"
|
||||
"checksum rand_chacha 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "03a2a90da8c7523f554344f921aa97283eadf6ac484a6d2a7d0212fa7f8d6853"
|
||||
"checksum rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b"
|
||||
"checksum rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9c33a3c44ca05fa6f1807d8e6743f3824e8509beca625669633be0acbdf509dc"
|
||||
"checksum rand_core 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "615e683324e75af5d43d8f7a39ffe3ee4a9dc42c5c701167a71dc59c3a493aca"
|
||||
"checksum rand_hc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7b40677c7be09ae76218dc623efbf7b18e34bced3f38883af07bb75630a21bc4"
|
||||
"checksum rand_hc 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c"
|
||||
"checksum rand_isaac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ded997c9d5f13925be2a6fd7e66bf1872597f759fd9dd93513dd7e92e5a5ee08"
|
||||
"checksum rand_jitter 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "1166d5c91dc97b88d1decc3285bb0a99ed84b05cfd0bc2341bdf2d43fc41e39b"
|
||||
"checksum rand_os 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7b75f676a1e053fc562eafbb47838d67c84801e38fc1ba459e8f180deabd5071"
|
||||
"checksum rand_pcg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "abf9b09b01790cfe0364f52bf32995ea3c39f4d2dd011eac241d2914146d0b44"
|
||||
"checksum rand_xorshift 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cbf7e9e623549b0e21f6e97cf8ecf247c1a8fd2e8a992ae265314300b2455d5c"
|
||||
"checksum rand_xoshiro 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "03b418169fb9c46533f326efd6eed2576699c44ca92d3052a066214a8d828929"
|
||||
"checksum raw-cpuid 6.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "30a9d219c32c9132f7be513c18be77c9881c7107d2ab5569d205a6a0f0e6dc7d"
|
||||
"checksum rayon 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a4b0186e22767d5b9738a05eab7c6ac90b15db17e5b5f9bd87976dd7d89a10a4"
|
||||
"checksum rayon-core 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ebbe0df8435ac0c397d467b6cad6d25543d06e8a019ef3f6af3c384597515bd2"
|
||||
"checksum rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2"
|
||||
"checksum redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)" = "2439c63f3f6139d1b57529d16bc3b8bb855230c8efcc5d3a896c8bea7c3b1e84"
|
||||
"checksum ref_thread_local 0.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d813022b2e00774a48eaf43caaa3c20b45f040ba8cbf398e2e8911a06668dbe6"
|
||||
"checksum regex 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "88c3d9193984285d544df4a30c23a4e62ead42edf70a4452ceb76dac1ce05c26"
|
||||
"checksum regex-automata 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "92b73c2a1770c255c240eaa4ee600df1704a38dc3feaa6e949e7fcd4f8dc09f9"
|
||||
"checksum regex-syntax 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)" = "b143cceb2ca5e56d5671988ef8b15615733e7ee16cd348e064333b251b89343f"
|
||||
@ -1886,6 +2101,8 @@ dependencies = [
|
||||
"checksum scopeguard 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b42e15e59b18a828bbf5c58ea01debb36b9b096346de35d941dcb89009f24a0d"
|
||||
"checksum scroll 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2f84d114ef17fd144153d608fba7c446b0145d038985e7a8cc5d08bb0ce20383"
|
||||
"checksum scroll_derive 0.9.5 (registry+https://github.com/rust-lang/crates.io-index)" = "8f1aa96c45e7f5a91cb7fabe7b279f02fea7126239fc40b732316e8b6a2d0fcb"
|
||||
"checksum sdl2 0.32.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d051a07231e303f5f719da78cb6f7394f6d5b54f733aef5b0b447804a83edd7b"
|
||||
"checksum sdl2-sys 0.32.6 (registry+https://github.com/rust-lang/crates.io-index)" = "34e71125077d297d57e4c1acfe8981b5bdfbf5a20e7b589abfdcb33bf1127f86"
|
||||
"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.99 (registry+https://github.com/rust-lang/crates.io-index)" = "fec2851eb56d010dc9a21b89ca53ee75e6528bab60c11e89d38390904982da9f"
|
||||
@ -1920,6 +2137,7 @@ dependencies = [
|
||||
"checksum unicode-xid 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f860d7d29cf02cb2f3f359fd35991af3d30bac52c57d265a3c461074cb4dc"
|
||||
"checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc"
|
||||
"checksum unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c"
|
||||
"checksum user32-sys 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e6b719983b952c04198829b51653c06af36f0e44c967fcc1a2bb397ceafbf80a"
|
||||
"checksum vec_map 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "05c78687fb1a80548ae3250346c3db86a80a7cdd77bda190189f2d0a0987c81a"
|
||||
"checksum version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "914b1a6776c4c929a602fafd8bc742e06365d4bcbe48c30f9cca5824f70dc9dd"
|
||||
"checksum void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d"
|
||||
@ -1939,3 +2157,4 @@ dependencies = [
|
||||
"checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
|
||||
"checksum wincolor 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "96f5016b18804d24db43cebf3c77269e7569b8954a8464501c216cc5e070eaa9"
|
||||
"checksum winconsole 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3ef84b96d10db72dd980056666d7f1e7663ce93d82fa33b63e71c966f4cf5032"
|
||||
"checksum x11-dl 2.14.0 (registry+https://github.com/rust-lang/crates.io-index)" = "326c500cdc166fd7c70dd8c8a829cd5c0ce7be5a5d98c25817de2b9bdc67faf8"
|
||||
|
@ -36,6 +36,7 @@ wasmer-kernel-loader = { path = "lib/kernel-loader", optional = true }
|
||||
wasmer-dev-utils = { path = "lib/dev-utils", optional = true }
|
||||
wasmer-wasi-tests = { path = "lib/wasi-tests", optional = true }
|
||||
wasmer-emscripten-tests = { path = "lib/emscripten-tests", optional = true }
|
||||
wasmer-wasi-framebuffer = { path = "lib/wasi-framebuffer", optional = true }
|
||||
|
||||
[workspace]
|
||||
members = [
|
||||
@ -54,6 +55,7 @@ members = [
|
||||
"lib/kernel-loader",
|
||||
"lib/kernel-net",
|
||||
"lib/dev-utils",
|
||||
"lib/wasi-framebuffer",
|
||||
"lib/wasi-tests",
|
||||
"lib/emscripten-tests",
|
||||
"examples/plugin-for-example"
|
||||
@ -91,6 +93,7 @@ backend-singlepass = [
|
||||
]
|
||||
wasi = ["wasmer-wasi"]
|
||||
# vfs = ["wasmer-runtime-abi"]
|
||||
experimental-framebuffer = ["wasmer-wasi-framebuffer"]
|
||||
|
||||
[[example]]
|
||||
name = "plugin"
|
||||
|
17
lib/wasi-framebuffer/Cargo.toml
Normal file
17
lib/wasi-framebuffer/Cargo.toml
Normal file
@ -0,0 +1,17 @@
|
||||
[package]
|
||||
name = "wasmer-wasi-framebuffer"
|
||||
version = "0.6.0"
|
||||
authors = ["The Wasmer Engineering Team <engineering@wasmer.io>"]
|
||||
edition = "2018"
|
||||
repository = "https://github.com/wasmerio/wasmer"
|
||||
publish = true
|
||||
description = "An experimental non-standard WASI extension for graphics"
|
||||
|
||||
[badges]
|
||||
maintenance = { status = "experimental" }
|
||||
|
||||
[dependencies]
|
||||
minifb = "0.11"
|
||||
wasmer-wasi = { version = "0.6.0", path = "../wasi" }
|
||||
wasmer-runtime-core = { version = "0.6.0", path = "../runtime-core" }
|
||||
ref_thread_local = "0.0"
|
7
lib/wasi-framebuffer/README.md
Normal file
7
lib/wasi-framebuffer/README.md
Normal file
@ -0,0 +1,7 @@
|
||||
# WASI Framebuffer
|
||||
|
||||
An experimental extension of WASI for basic graphics.
|
||||
|
||||
This is not part of the WASI standard right now so use at your own risk -- it may break or be removed
|
||||
|
||||
TODO add usage instructions here
|
432
lib/wasi-framebuffer/src/lib.rs
Normal file
432
lib/wasi-framebuffer/src/lib.rs
Normal file
@ -0,0 +1,432 @@
|
||||
use ref_thread_local::{ref_thread_local, refmanager::RefMut, RefThreadLocal};
|
||||
use std::convert::TryInto;
|
||||
use std::io::{Read, Seek, SeekFrom, Write};
|
||||
use wasmer_wasi::state::{WasiFile, WasiFs, ALL_RIGHTS, VIRTUAL_ROOT_FD};
|
||||
|
||||
use minifb::{Key, Scale, Window, WindowOptions};
|
||||
|
||||
ref_thread_local! {
|
||||
pub(crate) static managed FRAMEBUFFER_STATE: FrameBufferState =
|
||||
FrameBufferState::new();
|
||||
}
|
||||
|
||||
fn get_fb_state<'a>() -> RefMut<'a, FrameBufferState> {
|
||||
FRAMEBUFFER_STATE.borrow_mut()
|
||||
}
|
||||
|
||||
pub const MAX_X: u32 = 8192;
|
||||
pub const MAX_Y: u32 = 4320;
|
||||
|
||||
#[derive(Debug)]
|
||||
pub enum FrameBufferFileType {
|
||||
Buffer,
|
||||
Resolution,
|
||||
IndexDisplay,
|
||||
Input,
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub(crate) struct FrameBufferState {
|
||||
// double buffered
|
||||
pub data_1: Vec<u32>,
|
||||
pub data_2: Vec<u32>,
|
||||
|
||||
pub x_size: u32,
|
||||
pub y_size: u32,
|
||||
pub front_buffer: bool,
|
||||
|
||||
pub window: Window,
|
||||
}
|
||||
|
||||
impl FrameBufferState {
|
||||
pub fn new() -> Self {
|
||||
let x = 100;
|
||||
let y = 200;
|
||||
|
||||
let window = Self::create_window(x, y);
|
||||
|
||||
Self {
|
||||
data_1: vec![0; x * y],
|
||||
data_2: vec![0; x * y],
|
||||
|
||||
x_size: x as u32,
|
||||
y_size: y as u32,
|
||||
front_buffer: true,
|
||||
|
||||
window,
|
||||
}
|
||||
}
|
||||
|
||||
fn create_window(x: usize, y: usize) -> Window {
|
||||
Window::new(
|
||||
"Wasmer Experimental FrameBuffer",
|
||||
x,
|
||||
y,
|
||||
WindowOptions {
|
||||
resize: true,
|
||||
scale: Scale::X1,
|
||||
..WindowOptions::default()
|
||||
},
|
||||
)
|
||||
.unwrap()
|
||||
}
|
||||
|
||||
pub fn resize(&mut self, x: u32, y: u32) -> Option<()> {
|
||||
if x >= MAX_X || y >= MAX_Y {
|
||||
return None;
|
||||
}
|
||||
self.x_size = x;
|
||||
self.y_size = x;
|
||||
|
||||
self.data_1.resize((x * y) as usize, 0);
|
||||
self.data_2.resize((x * y) as usize, 0);
|
||||
|
||||
self.window = Self::create_window(x as usize, y as usize);
|
||||
|
||||
Some(())
|
||||
}
|
||||
|
||||
pub fn draw(&mut self) {
|
||||
self.window.update_with_buffer(if self.front_buffer {
|
||||
&self.data_1[..]
|
||||
} else {
|
||||
&self.data_2[..]
|
||||
});
|
||||
}
|
||||
|
||||
pub fn get_buffer(&self) -> &[u32] {
|
||||
if self.front_buffer {
|
||||
&self.data_1[..]
|
||||
} else {
|
||||
&self.data_2[..]
|
||||
}
|
||||
}
|
||||
pub fn get_buffer_mut(&mut self) -> &mut [u32] {
|
||||
if self.front_buffer {
|
||||
&mut self.data_1[..]
|
||||
} else {
|
||||
&mut self.data_2[..]
|
||||
}
|
||||
}
|
||||
|
||||
#[inline]
|
||||
// the real index into u32s and whether to use the front buffer or the back buffer
|
||||
fn get_idx_info(&self, idx: usize) -> Option<(usize, bool)> {
|
||||
let mut base_idx = idx / 4;
|
||||
let mut front_buffer = true;
|
||||
|
||||
if base_idx >= self.data_1.len() {
|
||||
base_idx -= self.data_1.len();
|
||||
front_buffer = false;
|
||||
|
||||
if base_idx >= self.data_2.len() {
|
||||
return None;
|
||||
}
|
||||
}
|
||||
|
||||
Some((base_idx, front_buffer))
|
||||
}
|
||||
|
||||
pub fn get_byte(&self, idx: usize) -> Option<u8> {
|
||||
let (base_idx, front_buffer) = self.get_idx_info(idx)?;
|
||||
|
||||
let shift = idx % 4;
|
||||
let shift_amt = 8 * shift;
|
||||
|
||||
if front_buffer {
|
||||
Some((self.data_1[base_idx] >> shift_amt) as u8)
|
||||
} else {
|
||||
Some((self.data_2[base_idx] >> shift_amt) as u8)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_byte(&mut self, idx: usize, val: u8) -> Option<()> {
|
||||
let (base_idx, front_buffer) = self.get_idx_info(idx)?;
|
||||
|
||||
let shift = idx % 4;
|
||||
let shift_amt = 8 * shift;
|
||||
|
||||
if front_buffer {
|
||||
self.data_1[base_idx] &= !(0xFF << shift_amt);
|
||||
self.data_1[base_idx] |= ((val as u32) << shift_amt) & (0xFF << shift_amt);
|
||||
} else {
|
||||
self.data_2[base_idx] &= !(0xFF << shift_amt);
|
||||
self.data_2[base_idx] |= ((val as u32) << shift_amt) & (0xFF << shift_amt);
|
||||
}
|
||||
Some(())
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct FrameBuffer {
|
||||
fb_type: FrameBufferFileType,
|
||||
cursor: u32,
|
||||
}
|
||||
|
||||
impl Read for FrameBuffer {
|
||||
fn read(&mut self, buf: &mut [u8]) -> std::io::Result<usize> {
|
||||
let fb_state = get_fb_state();
|
||||
let cursor = self.cursor as usize;
|
||||
match self.fb_type {
|
||||
FrameBufferFileType::Buffer => {
|
||||
let mut bytes_copied = 0;
|
||||
|
||||
for i in 0..buf.len() {
|
||||
if let Some(byte) = fb_state.get_byte(cursor + i) {
|
||||
buf[i] = byte;
|
||||
bytes_copied += 1;
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
self.cursor += bytes_copied;
|
||||
Ok(bytes_copied as usize)
|
||||
}
|
||||
FrameBufferFileType::Resolution => {
|
||||
let resolution_data = format!("{}x{}", fb_state.x_size, fb_state.y_size);
|
||||
|
||||
let mut bytes = resolution_data.bytes().skip(cursor);
|
||||
let bytes_to_copy = std::cmp::min(buf.len(), bytes.clone().count());
|
||||
|
||||
for i in 0..bytes_to_copy {
|
||||
buf[i] = bytes.next().unwrap();
|
||||
}
|
||||
|
||||
self.cursor += bytes_to_copy as u32;
|
||||
Ok(bytes_to_copy)
|
||||
}
|
||||
|
||||
FrameBufferFileType::IndexDisplay => {
|
||||
if buf.len() == 0 {
|
||||
Ok(0)
|
||||
} else {
|
||||
buf[0] = fb_state.front_buffer as u8 + b'0';
|
||||
Ok(1)
|
||||
}
|
||||
}
|
||||
|
||||
FrameBufferFileType::Input => {
|
||||
// do input
|
||||
unimplemented!()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn read_to_end(&mut self, _buf: &mut Vec<u8>) -> std::io::Result<usize> {
|
||||
unimplemented!()
|
||||
}
|
||||
fn read_to_string(&mut self, _buf: &mut String) -> std::io::Result<usize> {
|
||||
unimplemented!()
|
||||
}
|
||||
fn read_exact(&mut self, _buf: &mut [u8]) -> std::io::Result<()> {
|
||||
unimplemented!()
|
||||
}
|
||||
}
|
||||
|
||||
impl Seek for FrameBuffer {
|
||||
fn seek(&mut self, pos: SeekFrom) -> std::io::Result<u64> {
|
||||
match pos {
|
||||
SeekFrom::Current(offset) => {
|
||||
let result: std::io::Result<u64> = (self.cursor as i64)
|
||||
.checked_add(offset)
|
||||
.and_then(|v| v.try_into().ok())
|
||||
.ok_or_else(|| std::io::Error::from(std::io::ErrorKind::InvalidInput));
|
||||
|
||||
if let Ok(n) = result {
|
||||
self.cursor = n as u32;
|
||||
}
|
||||
result
|
||||
}
|
||||
SeekFrom::Start(offset) => {
|
||||
self.cursor = offset as u32;
|
||||
Ok(offset)
|
||||
}
|
||||
SeekFrom::End(_) => unimplemented!("Seek from end not yet implemented"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Write for FrameBuffer {
|
||||
fn write(&mut self, buf: &[u8]) -> std::io::Result<usize> {
|
||||
let mut fb_state = get_fb_state();
|
||||
let cursor = self.cursor as usize;
|
||||
match self.fb_type {
|
||||
FrameBufferFileType::Buffer => {
|
||||
let mut bytes_copied = 0;
|
||||
|
||||
for i in 0..buf.len() {
|
||||
if fb_state.set_byte(cursor + i, buf[i]).is_none() {
|
||||
// TODO: check if we should return an error here
|
||||
break;
|
||||
}
|
||||
bytes_copied += 1;
|
||||
}
|
||||
|
||||
self.cursor += bytes_copied;
|
||||
Ok(bytes_copied as usize)
|
||||
}
|
||||
FrameBufferFileType::Resolution => {
|
||||
let resolution_data = format!("{}x{}", fb_state.x_size, fb_state.y_size);
|
||||
let mut byte_vec: Vec<u8> = resolution_data.bytes().collect();
|
||||
let upper_limit = std::cmp::min(buf.len(), byte_vec.len() - cursor as usize);
|
||||
|
||||
for i in 0..upper_limit {
|
||||
byte_vec[i] = buf[i];
|
||||
}
|
||||
|
||||
let mut parse_str = String::new();
|
||||
for b in byte_vec.iter() {
|
||||
parse_str.push(*b as char);
|
||||
}
|
||||
let result: Vec<&str> = parse_str.split('x').collect();
|
||||
if result.len() != 2 {
|
||||
return Ok(0);
|
||||
}
|
||||
if let Ok((n1, n2)) = result[0]
|
||||
.parse::<u32>()
|
||||
.and_then(|n1| result[1].parse::<u32>().map(|n2| (n1, n2)))
|
||||
{
|
||||
if fb_state.resize(n1, n2).is_some() {
|
||||
return Ok(upper_limit);
|
||||
}
|
||||
}
|
||||
Ok(0)
|
||||
}
|
||||
|
||||
FrameBufferFileType::IndexDisplay => {
|
||||
if buf.len() == 0 {
|
||||
Ok(0)
|
||||
} else {
|
||||
match buf[0] {
|
||||
b'0' => fb_state.front_buffer = true,
|
||||
b'1' => fb_state.front_buffer = false,
|
||||
_ => (),
|
||||
}
|
||||
fb_state.draw();
|
||||
Ok(1)
|
||||
}
|
||||
}
|
||||
FrameBufferFileType::Input => Ok(0),
|
||||
}
|
||||
}
|
||||
fn flush(&mut self) -> std::io::Result<()> {
|
||||
Ok(())
|
||||
}
|
||||
fn write_all(&mut self, buf: &[u8]) -> std::io::Result<()> {
|
||||
self.write(buf).map(|_| ())
|
||||
}
|
||||
fn write_fmt(&mut self, _fmt: std::fmt::Arguments) -> std::io::Result<()> {
|
||||
unimplemented!()
|
||||
}
|
||||
}
|
||||
|
||||
impl WasiFile for FrameBuffer {
|
||||
fn last_accessed(&self) -> u64 {
|
||||
0
|
||||
}
|
||||
fn last_modified(&self) -> u64 {
|
||||
0
|
||||
}
|
||||
fn created_time(&self) -> u64 {
|
||||
0
|
||||
}
|
||||
fn size(&self) -> u64 {
|
||||
0
|
||||
}
|
||||
}
|
||||
|
||||
pub fn initialize(fs: &mut WasiFs) -> Result<(), String> {
|
||||
let frame_buffer_file = Box::new(FrameBuffer {
|
||||
fb_type: FrameBufferFileType::Buffer,
|
||||
cursor: 0,
|
||||
});
|
||||
let resolution_file = Box::new(FrameBuffer {
|
||||
fb_type: FrameBufferFileType::Resolution,
|
||||
cursor: 0,
|
||||
});
|
||||
let index_file = Box::new(FrameBuffer {
|
||||
fb_type: FrameBufferFileType::IndexDisplay,
|
||||
cursor: 0,
|
||||
});
|
||||
let input_file = Box::new(FrameBuffer {
|
||||
fb_type: FrameBufferFileType::Input,
|
||||
cursor: 0,
|
||||
});
|
||||
|
||||
let dev_fd = unsafe {
|
||||
fs.open_dir_all(
|
||||
VIRTUAL_ROOT_FD,
|
||||
"dev".to_string(),
|
||||
ALL_RIGHTS,
|
||||
ALL_RIGHTS,
|
||||
0,
|
||||
)
|
||||
.map_err(|e| format!("fb: Failed to create dev folder {:?}", e))?
|
||||
};
|
||||
|
||||
let fb_fd = unsafe {
|
||||
fs.open_dir_all(
|
||||
VIRTUAL_ROOT_FD,
|
||||
"sys/class/graphics/wasmerfb".to_string(),
|
||||
ALL_RIGHTS,
|
||||
ALL_RIGHTS,
|
||||
0,
|
||||
)
|
||||
.map_err(|e| format!("fb: Failed to create dev folder {:?}", e))?
|
||||
};
|
||||
|
||||
let fd = fs
|
||||
.open_file_at(
|
||||
dev_fd,
|
||||
input_file,
|
||||
"input".to_string(),
|
||||
ALL_RIGHTS,
|
||||
ALL_RIGHTS,
|
||||
0,
|
||||
)
|
||||
.map_err(|e| format!("fb: Failed to init framebuffer {:?}", e))?;
|
||||
|
||||
println!("Input open on fd {}", fd);
|
||||
|
||||
let fd = fs
|
||||
.open_file_at(
|
||||
dev_fd,
|
||||
frame_buffer_file,
|
||||
"wasmerfb0".to_string(),
|
||||
ALL_RIGHTS,
|
||||
ALL_RIGHTS,
|
||||
0,
|
||||
)
|
||||
.map_err(|e| format!("fb: Failed to init framebuffer {:?}", e))?;
|
||||
|
||||
println!("Framebuffer open on fd {}", fd);
|
||||
|
||||
let fd = fs
|
||||
.open_file_at(
|
||||
fb_fd,
|
||||
resolution_file,
|
||||
"virtual_size".to_string(),
|
||||
ALL_RIGHTS,
|
||||
ALL_RIGHTS,
|
||||
0,
|
||||
)
|
||||
.map_err(|e| format!("fb_resolution: Failed to init framebuffer {:?}", e))?;
|
||||
|
||||
println!("Framebuffer resolution open on fd {}", fd);
|
||||
|
||||
let fd = fs
|
||||
.open_file_at(
|
||||
fb_fd,
|
||||
index_file,
|
||||
"buffer_index_display".to_string(),
|
||||
ALL_RIGHTS,
|
||||
ALL_RIGHTS,
|
||||
0,
|
||||
)
|
||||
.map_err(|e| format!("fb_index_display: Failed to init framebuffer {:?}", e))?;
|
||||
|
||||
println!("Framebuffer draw open on fd {}", fd);
|
||||
|
||||
Ok(())
|
||||
}
|
1
lib/wasi-framebuffer/src/util.rs
Normal file
1
lib/wasi-framebuffer/src/util.rs
Normal file
@ -0,0 +1 @@
|
||||
|
@ -39,6 +39,16 @@ pub fn generate_import_object(
|
||||
envs: Vec<Vec<u8>>,
|
||||
preopened_files: Vec<String>,
|
||||
mapped_dirs: Vec<(String, PathBuf)>,
|
||||
) -> ImportObject {
|
||||
generate_import_object_with_fs_setup(args, envs, preopened_files, mapped_dirs, None)
|
||||
}
|
||||
|
||||
pub fn generate_import_object_with_fs_setup(
|
||||
args: Vec<Vec<u8>>,
|
||||
envs: Vec<Vec<u8>>,
|
||||
preopened_files: Vec<String>,
|
||||
mapped_dirs: Vec<(String, PathBuf)>,
|
||||
setup_fs: Option<Box<dyn Fn(&mut WasiFs) -> Result<(), String>>>,
|
||||
) -> ImportObject {
|
||||
let state_gen = move || {
|
||||
fn state_destructor(data: *mut c_void) {
|
||||
@ -47,8 +57,13 @@ pub fn generate_import_object(
|
||||
}
|
||||
}
|
||||
|
||||
let mut fs = WasiFs::new(&preopened_files, &mapped_dirs).unwrap();
|
||||
if let Some(sfn) = &setup_fs {
|
||||
sfn(&mut fs).unwrap();
|
||||
}
|
||||
|
||||
let state = Box::new(WasiState {
|
||||
fs: WasiFs::new(&preopened_files, &mapped_dirs).unwrap(),
|
||||
fs,
|
||||
args: &args[..],
|
||||
envs: &envs[..],
|
||||
});
|
||||
|
@ -70,6 +70,11 @@ pub enum Kind {
|
||||
/// The path on the host system where the file is located
|
||||
/// This is deprecated and will be removed in 0.7.0 or a shortly thereafter
|
||||
path: PathBuf,
|
||||
/// Marks the file as a special file that only one `fd` can exist for
|
||||
/// This is useful when dealing with host-provided special files that
|
||||
/// should be looked up by path
|
||||
/// TOOD: clarify here?
|
||||
fd: Option<u32>,
|
||||
},
|
||||
Dir {
|
||||
/// Parent directory
|
||||
@ -268,6 +273,64 @@ impl WasiFs {
|
||||
next
|
||||
}
|
||||
|
||||
/// like create dir all, but it also opens it
|
||||
/// Function is unsafe because it may break invariants and hasn't been tested.
|
||||
/// This is an experimental function and may be removed
|
||||
// dead code because this is an API for external use
|
||||
#[allow(dead_code)]
|
||||
pub unsafe fn open_dir_all(
|
||||
&mut self,
|
||||
base: __wasi_fd_t,
|
||||
name: String,
|
||||
rights: __wasi_rights_t,
|
||||
rights_inheriting: __wasi_rights_t,
|
||||
flags: __wasi_fdflags_t,
|
||||
) -> Result<__wasi_fd_t, WasiFsError> {
|
||||
let base_fd = self.get_fd(base).map_err(WasiFsError::from_wasi_err)?;
|
||||
// TODO: check permissions here? probably not, but this should be
|
||||
// an explicit choice, so justify it in a comment when we remove this one
|
||||
let mut cur_inode = base_fd.inode;
|
||||
|
||||
let path: &Path = Path::new(&name);
|
||||
//let n_components = path.components().count();
|
||||
for c in path.components() {
|
||||
let segment_name = c.as_os_str().to_string_lossy().to_string();
|
||||
match &self.inodes[cur_inode].kind {
|
||||
Kind::Dir { ref entries, .. } | Kind::Root { ref entries } => {
|
||||
if let Some(_entry) = entries.get(&segment_name) {
|
||||
// TODO: this should be fixed
|
||||
return Err(WasiFsError::AlreadyExists);
|
||||
}
|
||||
|
||||
let kind = Kind::Dir {
|
||||
parent: Some(cur_inode),
|
||||
path: PathBuf::from(""),
|
||||
entries: HashMap::new(),
|
||||
};
|
||||
|
||||
let inode =
|
||||
self.create_inode_with_default_stat(kind, false, segment_name.clone());
|
||||
// reborrow to insert
|
||||
match &mut self.inodes[cur_inode].kind {
|
||||
Kind::Dir {
|
||||
ref mut entries, ..
|
||||
}
|
||||
| Kind::Root { ref mut entries } => {
|
||||
entries.insert(segment_name, inode);
|
||||
}
|
||||
_ => unreachable!("Dir or Root became not Dir or Root"),
|
||||
}
|
||||
|
||||
cur_inode = inode;
|
||||
}
|
||||
_ => return Err(WasiFsError::BaseNotDirectory),
|
||||
}
|
||||
}
|
||||
|
||||
self.create_fd(rights, rights_inheriting, flags, cur_inode)
|
||||
.map_err(WasiFsError::from_wasi_err)
|
||||
}
|
||||
|
||||
/// Opens a user-supplied file in the directory specified with the
|
||||
/// name and flags given
|
||||
// dead code because this is an API for external use
|
||||
@ -296,6 +359,7 @@ impl WasiFs {
|
||||
let kind = Kind::File {
|
||||
handle: Some(file),
|
||||
path: PathBuf::from(""),
|
||||
fd: Some(self.next_fd.get()),
|
||||
};
|
||||
|
||||
let inode = self
|
||||
@ -307,7 +371,7 @@ impl WasiFs {
|
||||
ref mut entries, ..
|
||||
}
|
||||
| Kind::Root { ref mut entries } => {
|
||||
entries.insert(name, inode).ok_or(WasiFsError::IOError)?;
|
||||
entries.insert(name, inode);
|
||||
}
|
||||
_ => unreachable!("Dir or Root became not Dir or Root"),
|
||||
}
|
||||
@ -456,6 +520,7 @@ impl WasiFs {
|
||||
Kind::File {
|
||||
handle: None,
|
||||
path: file.clone(),
|
||||
fd: None,
|
||||
}
|
||||
} else if file_type.is_symlink() {
|
||||
let link_value = file.read_link().ok().ok_or(__WASI_EIO)?;
|
||||
@ -855,7 +920,7 @@ impl WasiFs {
|
||||
|
||||
pub fn get_stat_for_kind(&self, kind: &Kind) -> Option<__wasi_filestat_t> {
|
||||
let md = match kind {
|
||||
Kind::File { handle, path } => match handle {
|
||||
Kind::File { handle, path, .. } => match handle {
|
||||
Some(wf) => {
|
||||
return Some(__wasi_filestat_t {
|
||||
st_filetype: __WASI_FILETYPE_REGULAR_FILE,
|
||||
|
@ -1678,6 +1678,8 @@ pub fn path_open(
|
||||
dirflags & __WASI_LOOKUP_SYMLINK_FOLLOW != 0,
|
||||
);
|
||||
|
||||
dbg!(&maybe_inode);
|
||||
|
||||
if let Ok(m) = maybe_inode {
|
||||
&state.fs.inodes[m];
|
||||
}
|
||||
@ -1692,7 +1694,14 @@ pub fn path_open(
|
||||
Kind::File {
|
||||
ref mut handle,
|
||||
path,
|
||||
fd,
|
||||
} => {
|
||||
if let Some(special_fd) = fd {
|
||||
// short circuit if we're dealing with a special file
|
||||
assert!(handle.is_some());
|
||||
fd_cell.set(*special_fd);
|
||||
return __WASI_ESUCCESS;
|
||||
}
|
||||
if o_flags & __WASI_O_DIRECTORY != 0 {
|
||||
return __WASI_ENOTDIR;
|
||||
}
|
||||
@ -1782,6 +1791,7 @@ pub fn path_open(
|
||||
let kind = Kind::File {
|
||||
handle,
|
||||
path: new_file_host_path,
|
||||
fd: None,
|
||||
};
|
||||
wasi_try!(state.fs.create_inode(kind, false, new_entity_name.clone()))
|
||||
};
|
||||
@ -2018,6 +2028,7 @@ pub fn path_rename(
|
||||
Kind::File {
|
||||
handle,
|
||||
ref mut path,
|
||||
..
|
||||
} => {
|
||||
let result = if let Some(h) = handle {
|
||||
h.rename_file(&host_adjusted_target_path)
|
||||
@ -2188,7 +2199,7 @@ pub fn path_unlink_file(
|
||||
state.fs.inodes[removed_inode].stat.st_nlink -= 1;
|
||||
if state.fs.inodes[removed_inode].stat.st_nlink == 0 {
|
||||
match &mut state.fs.inodes[removed_inode].kind {
|
||||
Kind::File { handle, path } => {
|
||||
Kind::File { handle, path, .. } => {
|
||||
if let Some(h) = handle {
|
||||
wasi_try!(h.unlink().map_err(WasiFsError::into_wasi_err));
|
||||
} else {
|
||||
@ -2259,11 +2270,14 @@ pub fn poll_oneoff(
|
||||
let out_ptr = wasi_try!(nevents.deref(memory));
|
||||
|
||||
let mut fds = vec![];
|
||||
let mut clock_subs = vec![];
|
||||
let mut in_events = vec![];
|
||||
let mut total_ns_slept = 0;
|
||||
|
||||
for sub in subscription_array.iter() {
|
||||
let s: WasiSubscription = wasi_try!(sub.get().try_into());
|
||||
let mut peb = PollEventBuilder::new();
|
||||
let mut ns_to_sleep = 0;
|
||||
|
||||
let fd = match s.event_type {
|
||||
EventType::Read(__wasi_subscription_fs_readwrite_t { fd }) => {
|
||||
@ -2293,7 +2307,17 @@ pub fn poll_oneoff(
|
||||
in_events.push(peb.add(PollEvent::PollOut).build());
|
||||
Some(fd)
|
||||
}
|
||||
_ => unimplemented!("Clock eventtypes in wasi::poll_oneoff"),
|
||||
EventType::Clock(clock_info) => {
|
||||
if clock_info.clock_id == __WASI_CLOCK_REALTIME {
|
||||
// this is a hack
|
||||
// TODO: do this properly
|
||||
ns_to_sleep = clock_info.timeout;
|
||||
clock_subs.push(clock_info);
|
||||
None
|
||||
} else {
|
||||
unimplemented!("Polling not implemented for clocks yet");
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
if let Some(fd) = fd {
|
||||
@ -2327,7 +2351,13 @@ pub fn poll_oneoff(
|
||||
};
|
||||
fds.push(wasi_file_ref);
|
||||
} else {
|
||||
unimplemented!("Clock events are not yet implemented!");
|
||||
let remaining_ns = ns_to_sleep as i64 - total_ns_slept as i64;
|
||||
if remaining_ns > 0 {
|
||||
debug!("Sleeping for {} nanoseconds", remaining_ns);
|
||||
let duration = std::time::Duration::from_nanos(remaining_ns as u64);
|
||||
std::thread::sleep(duration);
|
||||
total_ns_slept += remaining_ns;
|
||||
}
|
||||
}
|
||||
}
|
||||
let mut seen_events = vec![Default::default(); in_events.len()];
|
||||
@ -2376,6 +2406,23 @@ pub fn poll_oneoff(
|
||||
event_array[events_seen].set(event);
|
||||
events_seen += 1;
|
||||
}
|
||||
for clock_info in clock_subs {
|
||||
let event = __wasi_event_t {
|
||||
userdata: clock_info.userdata,
|
||||
error: __WASI_ESUCCESS,
|
||||
type_: __WASI_EVENTTYPE_CLOCK,
|
||||
u: unsafe {
|
||||
__wasi_event_u {
|
||||
fd_readwrite: __wasi_event_fd_readwrite_t {
|
||||
nbytes: 0,
|
||||
flags: 0,
|
||||
},
|
||||
}
|
||||
},
|
||||
};
|
||||
event_array[events_seen].set(event);
|
||||
events_seen += 1;
|
||||
}
|
||||
out_ptr.set(events_seen as u32);
|
||||
__WASI_ESUCCESS
|
||||
}
|
||||
|
@ -48,11 +48,14 @@ mod wasmer_wasi {
|
||||
false
|
||||
}
|
||||
|
||||
pub fn generate_import_object(
|
||||
pub struct WasiFs;
|
||||
|
||||
pub fn generate_import_object_with_fs_setup(
|
||||
_args: Vec<Vec<u8>>,
|
||||
_envs: Vec<Vec<u8>>,
|
||||
_preopened_files: Vec<String>,
|
||||
_mapped_dirs: Vec<(String, std::path::PathBuf)>,
|
||||
_setup_fs: Option<Box<dyn Fn(&mut WasiFs) -> Result<(), String>>>,
|
||||
) -> ImportObject {
|
||||
unimplemented!()
|
||||
}
|
||||
@ -576,7 +579,7 @@ fn execute_wasm(options: &Run) -> Result<(), String> {
|
||||
.map_err(|e| format!("{:?}", e))?;
|
||||
} else {
|
||||
if cfg!(feature = "wasi") && wasmer_wasi::is_wasi_module(&module) {
|
||||
let import_object = wasmer_wasi::generate_import_object(
|
||||
let import_object = wasmer_wasi::generate_import_object_with_fs_setup(
|
||||
if let Some(cn) = &options.command_name {
|
||||
[cn.clone()]
|
||||
} else {
|
||||
@ -593,6 +596,10 @@ fn execute_wasm(options: &Run) -> Result<(), String> {
|
||||
.collect(),
|
||||
options.pre_opened_directories.clone(),
|
||||
mapped_dirs,
|
||||
#[cfg(feature = "experimental-framebuffer")]
|
||||
Some(Box::new(wasmer_wasi_framebuffer::initialize)),
|
||||
#[cfg(not(feature = "experimental-framebuffer"))]
|
||||
None,
|
||||
);
|
||||
|
||||
#[allow(unused_mut)] // mut used in feature
|
||||
|
Reference in New Issue
Block a user