diff --git a/Cargo.lock b/Cargo.lock index 9910f809e0f..f927bfba610 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2379,6 +2379,12 @@ dependencies = [ "winapi", ] +[[package]] +name = "nuke-dir" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a6842d8099b88d19a64158a6cfdc3e9ad82c738c041dab98280ef7ba98d64fa" + [[package]] name = "num-integer" version = "0.1.45" @@ -4864,6 +4870,7 @@ dependencies = [ "libc", "log", "minisign", + "nuke-dir", "object 0.30.3", "pathdiff", "prettytable-rs", @@ -5204,11 +5211,9 @@ dependencies = [ "derivative", "filetime", "fs_extra", - "indexmap", "lazy_static", "libc", "pin-project-lite", - "serde", "slab", "thiserror", "tokio", diff --git a/lib/c-api/Cargo.toml b/lib/c-api/Cargo.toml index 2520c9fd56f..04413d379ac 100644 --- a/lib/c-api/Cargo.toml +++ b/lib/c-api/Cargo.toml @@ -16,25 +16,20 @@ edition = "2018" # `libwasmer.so`, `libwasmer.dylib`, `wasmer.dll` etc. But it creates # a conflict with the existing `wasmer` crate, see below. name = "wasmer" # ##lib.name## -# ^ DO NOT REMOVE, it's used the `Makefile`, see `build-docs-capi`. + # ^ DO NOT REMOVE, it's used the `Makefile`, see `build-docs-capi`. crate-type = ["staticlib", "cdylib"] #"cdylib", "rlib", "staticlib"] [dependencies] # We rename `wasmer` to `wasmer-api` to avoid the conflict with this # library name (see `[lib]`). -wasmer-api = { version = "=3.2.0-alpha.1", path = "../api", default-features = false, features = [ - "sys", -], package = "wasmer" } +wasmer-api = { version = "=3.2.0-alpha.1", path = "../api", default-features = false, features = ["sys"], package = "wasmer" } wasmer-compiler-cranelift = { version = "=3.2.0-alpha.1", path = "../compiler-cranelift", optional = true } wasmer-compiler-singlepass = { version = "=3.2.0-alpha.1", path = "../compiler-singlepass", optional = true } wasmer-compiler-llvm = { version = "=3.2.0-alpha.1", path = "../compiler-llvm", optional = true } wasmer-emscripten = { version = "=3.2.0-alpha.1", path = "../emscripten", optional = true } wasmer-compiler = { version = "=3.2.0-alpha.1", path = "../compiler" } wasmer-middlewares = { version = "=3.2.0-alpha.1", path = "../middlewares", optional = true } -wasmer-wasi = { version = "=3.2.0-alpha.1", path = "../wasi", features = [ - "host-fs", - "host-vnet", -], optional = true } +wasmer-wasi = { version = "=3.2.0-alpha.1", path = "../wasi", features = ["host-fs", "host-vnet"], optional = true } wasmer-types = { version = "=3.2.0-alpha.1", path = "../types" } wasmer-vfs = { version = "=3.2.0-alpha.1", path = "../vfs", optional = true, default-features = false, features = ["static-fs"] } webc = { version = "5.0.0-rc.5", optional = true } @@ -56,10 +51,19 @@ wasmer-inline-c = "0.1.1" inline-c = "0.1.7" [features] -default = ["wat", "cranelift", "compiler", "wasi", "middlewares"] +default = [ + "wat", + "cranelift", + "compiler", + "wasi", + "middlewares", +] wat = ["wasmer-api/wat"] wasi = ["wasmer-wasi"] -middlewares = ["compiler", "wasmer-middlewares"] +middlewares = [ + "compiler", + "wasmer-middlewares", +] compiler = [ "wasmer-api/compiler", "wasmer-compiler/translator", @@ -72,14 +76,23 @@ compiler-headless = [ "wasmer-compiler/translator", "wasmer-compiler/compiler", ] -singlepass = ["wasmer-compiler-singlepass", "compiler"] -cranelift = ["wasmer-compiler-cranelift", "compiler"] -llvm = ["wasmer-compiler-llvm", "compiler"] +singlepass = [ + "wasmer-compiler-singlepass", + "compiler", +] +cranelift = [ + "wasmer-compiler-cranelift", + "compiler", +] +llvm = [ + "wasmer-compiler-llvm", + "compiler", +] wasmer-artifact-load = ["wasmer-compiler/wasmer-artifact-load"] wasmer-artifact-create = ["wasmer-compiler/wasmer-artifact-create"] static-artifact-load = ["wasmer-compiler/static-artifact-load"] static-artifact-create = ["wasmer-compiler/static-artifact-create"] -webc_runner = ["wasmer-wasi/webc_runner", "webc", "wasmer-vfs"] +webc_runner = ["wasmer-wasi/webc_runner", "wasmer-vfs", "webc"] # Deprecated features. jit = ["compiler"] diff --git a/lib/cli/Cargo.toml b/lib/cli/Cargo.toml index bb2f3eb50db..4fe65e42d8d 100644 --- a/lib/cli/Cargo.toml +++ b/lib/cli/Cargo.toml @@ -26,30 +26,22 @@ required-features = ["headless"] [dependencies] wasmer = { version = "=3.2.0-alpha.1", path = "../api", default-features = false } -wasmer-compiler = { version = "=3.2.0-alpha.1", path = "../compiler", features = [ - "compiler", -] } +wasmer-compiler = { version = "=3.2.0-alpha.1", path = "../compiler", features = ["compiler", ] } wasmer-compiler-cranelift = { version = "=3.2.0-alpha.1", path = "../compiler-cranelift", optional = true } wasmer-compiler-singlepass = { version = "=3.2.0-alpha.1", path = "../compiler-singlepass", optional = true } wasmer-compiler-llvm = { version = "=3.2.0-alpha.1", path = "../compiler-llvm", optional = true } wasmer-emscripten = { version = "=3.2.0-alpha.1", path = "../emscripten", optional = true } wasmer-vm = { version = "=3.2.0-alpha.1", path = "../vm" } wasmer-wasi = { version = "=3.2.0-alpha.1", path = "../wasi", optional = true } -wasmer-wasi-experimental-io-devices = { version = "=3.2.0-alpha.1", path = "../wasi-experimental-io-devices", optional = true, features = [ - "link_external_libs", -] } +wasmer-wasi-experimental-io-devices = { version = "=3.2.0-alpha.1", path = "../wasi-experimental-io-devices", optional = true, features = ["link_external_libs"] } wasmer-wasi-local-networking = { version = "=3.2.0-alpha.1", path = "../wasi-local-networking", optional = true } wasmer-wast = { version = "=3.2.0-alpha.1", path = "../../tests/lib/wast", optional = true } wasmer-cache = { version = "=3.2.0-alpha.1", path = "../cache", optional = true } -wasmer-types = { version = "=3.2.0-alpha.1", path = "../types", features = [ - "enable-serde", -] } +wasmer-types = { version = "=3.2.0-alpha.1", path = "../types", features = ["enable-serde"] } wasmer-registry = { version = "=4.0.0", path = "../registry" } wasmer-object = { version = "=3.2.0-alpha.1", path = "../object", optional = true } -wasmer-vfs = { version = "=3.2.0-alpha.1", path = "../vfs", default-features = false, features = [ - "host-fs", -] } -wasmer-vnet = { version = "=3.2.0-alpha.1", path = "../vnet" } +wasmer-vfs = { version = "=3.2.0-alpha.1", path = "../vfs", default-features = false, features = ["host-fs"] } +wasmer-vnet = { version = "=3.2.0-alpha.1", path = "../vnet" } wasmer-wasm-interface = { version = "3.2.0-alpha.1", path = "../wasm-interface" } wasmparser = "0.51.4" atty = "0.2" @@ -64,7 +56,7 @@ bytesize = "1.0" cfg-if = "1.0" # For debug feature fern = { version = "0.6", features = ["colored"], optional = true } -tempfile = "3" +tempfile = "3.4.0" http_req = { version="^0.8", default-features = false, features = ["rust-tls"] } reqwest = { version = "^0.11", default-features = false, features = ["rustls-tls", "json", "multipart"] } serde = { version = "1.0.147", features = ["derive"] } @@ -79,6 +71,7 @@ regex = "1.6.0" toml = "0.5.9" url = "2.3.1" libc = { version = "^0.2", default-features = false } +nuke-dir = { version = "0.1.0", optional = true } webc = { version = "5.0.0-rc.5", optional = true } isatty = "0.1.9" dialoguer = "0.10.2" @@ -89,11 +82,7 @@ cargo_metadata = "0.15.2" rusqlite = { version = "0.28.0", features = ["bundled"] } tar = "0.4.38" thiserror = "1.0.37" -time = { version = "0.3.17", default-features = false, features = [ - "parsing", - "std", - "formatting", -] } +time = { version = "0.3.17", default-features = false, features = ["parsing", "std", "formatting"] } log = "0.4.17" minisign = "0.7.2" semver = "1.0.14" @@ -104,10 +93,7 @@ object = "0.30.0" wasm-coredump-builder = { version = "0.1.11" } [build-dependencies] -chrono = { version = "^0.4", default-features = false, features = [ - "std", - "clock", -] } +chrono = { version = "^0.4", default-features = false, features = [ "std", "clock" ] } [target.'cfg(target_os = "linux")'.dependencies] unix_mode = "0.1.3" @@ -132,50 +118,51 @@ wast = ["wasmer-wast"] wasi = ["wasmer-wasi", "wasmer-wasi-local-networking"] emscripten = ["wasmer-emscripten"] wat = ["wasmer/wat"] -webc_runner = [ - "wasi", - "wasmer-wasi/webc_runner", - "wasmer-wasi/webc_runner_rt_wasi", - "wasmer-wasi/webc_runner_rt_emscripten", - "wasmer-wasi/webc_runner_rt_wcgi", - "webc", -] +webc_runner = ["wasi", "wasmer-wasi/webc_runner", "wasmer-wasi/webc_runner_rt_wasi", "wasmer-wasi/webc_runner_rt_emscripten", "nuke-dir", "webc"] compiler = [ "wasmer-compiler/translator", "wasmer-compiler/compiler", - "wasmer-wasi/compiler", + "wasmer-wasi/compiler" ] -wasmer-artifact-create = [ - "compiler", - "wasmer/wasmer-artifact-load", - "wasmer/wasmer-artifact-create", - "wasmer-compiler/wasmer-artifact-load", - "wasmer-compiler/wasmer-artifact-create", - "wasmer-object", +wasmer-artifact-create = ["compiler", + "wasmer/wasmer-artifact-load", + "wasmer/wasmer-artifact-create", + "wasmer-compiler/wasmer-artifact-load", + "wasmer-compiler/wasmer-artifact-create", + "wasmer-object", + ] +static-artifact-create = ["compiler", + "wasmer/static-artifact-load", + "wasmer/static-artifact-create", + "wasmer-compiler/static-artifact-load", + "wasmer-compiler/static-artifact-create", + "wasmer-object", + ] +wasmer-artifact-load = ["compiler", + "wasmer/wasmer-artifact-load", + "wasmer-compiler/wasmer-artifact-load", + ] +static-artifact-load = ["compiler", + "wasmer/static-artifact-load", + "wasmer-compiler/static-artifact-load", + ] + +experimental-io-devices = [ + "wasmer-wasi-experimental-io-devices", + "wasi" ] -static-artifact-create = [ +singlepass = [ + "wasmer-compiler-singlepass", "compiler", - "wasmer/static-artifact-load", - "wasmer/static-artifact-create", - "wasmer-compiler/static-artifact-load", - "wasmer-compiler/static-artifact-create", - "wasmer-object", ] -wasmer-artifact-load = [ +cranelift = [ + "wasmer-compiler-cranelift", "compiler", - "wasmer/wasmer-artifact-load", - "wasmer-compiler/wasmer-artifact-load", ] -static-artifact-load = [ +llvm = [ + "wasmer-compiler-llvm", "compiler", - "wasmer/static-artifact-load", - "wasmer-compiler/static-artifact-load", ] - -experimental-io-devices = ["wasmer-wasi-experimental-io-devices", "wasi"] -singlepass = ["wasmer-compiler-singlepass", "compiler"] -cranelift = ["wasmer-compiler-cranelift", "compiler"] -llvm = ["wasmer-compiler-llvm", "compiler"] debug = ["fern", "wasmer-wasi/logging"] disable-all-logging = ["wasmer-wasi/disable-all-logging", "log/release_max_level_off"] headless = [] @@ -183,10 +170,10 @@ headless-minimal = ["headless", "disable-all-logging", "wasi"] # Optional enable-serde = [ - "wasmer/enable-serde", - "wasmer-vm/enable-serde", - "wasmer-compiler/enable-serde", - "wasmer-wasi/enable-serde", + "wasmer/enable-serde", + "wasmer-vm/enable-serde", + "wasmer-compiler/enable-serde", + "wasmer-wasi/enable-serde", ] [target.'cfg(target_os = "windows")'.dependencies] diff --git a/lib/registry/Cargo.toml b/lib/registry/Cargo.toml index aee1820cd97..217b6609686 100644 --- a/lib/registry/Cargo.toml +++ b/lib/registry/Cargo.toml @@ -13,13 +13,7 @@ dirs = "4.0.0" graphql_client = "0.11.0" serde = { version = "1.0.145", features = ["derive"] } anyhow = "1.0.65" -reqwest = { version = "0.11.12", default-features = false, features = [ - "rustls-tls", - "blocking", - "multipart", - "json", - "stream", -] } +reqwest = { version = "0.11.12", default-features = false, features = ["rustls-tls", "blocking", "multipart", "json", "stream"] } futures-util = "0.3.25" whoami = "1.2.3" serde_json = "1.0.85" diff --git a/lib/vfs/Cargo.toml b/lib/vfs/Cargo.toml index b848c09f26e..5abf8dd3023 100644 --- a/lib/vfs/Cargo.toml +++ b/lib/vfs/Cargo.toml @@ -20,25 +20,16 @@ lazy_static = "1.4" fs_extra = { version = "1.2.0", optional = true } filetime = { version = "0.2.18", optional = true } bytes = "1" -tokio = { version = "1", features = [ - "io-util", - "sync", - "macros", -], default_features = false } +tokio = { version = "1", features = [ "io-util", "sync", "macros" ], default_features = false } pin-project-lite = "0.2.9" -indexmap = "1.9.2" -serde = { version = "1", optional = true, features = ["derive"] } [dev-dependencies] -tokio = { version = "1", features = [ - "io-util", - "rt", -], default_features = false } +tokio = { version = "1", features = [ "io-util", "rt" ], default_features = false } [features] default = ["host-fs", "webc-fs", "static-fs"] host-fs = ["libc", "fs_extra", "filetime", "tokio/fs", "tokio/io-std"] webc-fs = ["webc", "anyhow"] static-fs = ["webc", "anyhow"] -enable-serde = ["serde", "typetag"] +enable-serde = ["typetag"] no-time = []