Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wasmer-cli: create-obj command #3057

Merged
merged 4 commits into from
Aug 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions Cargo.lock

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

4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,10 @@ singlepass = ["wasmer-compiler-singlepass", "compiler"]
cranelift = ["wasmer-compiler-cranelift", "compiler"]
llvm = ["wasmer-compiler-llvm", "compiler"]
middlewares = ["wasmer-middlewares"]
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"]

# Testing features
test-singlepass = ["singlepass"]
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -254,13 +254,13 @@ space := $() $()
comma := ,

# Define the compiler Cargo features for all crates.
compiler_features := --features $(subst $(space),$(comma),$(compilers))
compiler_features := --features $(subst $(space),$(comma),$(compilers)),wasmer-artifact-create,static-artifact-create,wasmer-artifact-load,static-artifact-load
capi_compilers_engines_exclude :=

# Define the compiler Cargo features for the C API. It always excludes
# LLVM for the moment because it causes the linker to fail since LLVM is not statically linked.
# TODO: Reenable LLVM in C-API
capi_compiler_features := --features $(subst $(space),$(comma),$(filter-out llvm, $(compilers)))
capi_compiler_features := --features $(subst $(space),$(comma),$(filter-out llvm, $(compilers))),wasmer-artifact-create,static-artifact-create,wasmer-artifact-load,static-artifact-load
capi_compilers_engines_exclude += llvm-universal

# We exclude singlepass-universal because it doesn't support multivalue (required in wasm-c-api tests)
Expand Down
4 changes: 4 additions & 0 deletions fuzz/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ cranelift = [ "wasmer-compiler-cranelift" ]
llvm = [ "wasmer-compiler-llvm" ]
singlepass = [ "wasmer-compiler-singlepass" ]
universal = [ "wasmer-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"]

[[bin]]
name = "equivalence_universal"
Expand Down
14 changes: 13 additions & 1 deletion lib/api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ edition = "2018"
# Shared dependencies.
[dependencies]
# - Mandatory shared dependencies.
indexmap = { version = "1.6", features = ["serde-1"] }
indexmap = { version = "1.6" }
cfg-if = "1.0"
thiserror = "1.0"
more-asserts = "0.2"
Expand Down Expand Up @@ -113,5 +113,17 @@ wasm-types-polyfill = ["js", "wasmparser"]

js-serializable-module = []

# Optional
enable-serde = [
"wasmer-vm/enable-serde",
"wasmer-compiler/enable-serde",
"wasmer-types/enable-serde",
]

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"]

[package.metadata.docs.rs]
features = ["compiler", "core", "cranelift", "engine", "jit", "native", "singlepass", "sys", "sys-default" ]
5 changes: 4 additions & 1 deletion lib/c-api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ enumset = "1.0.2"
cfg-if = "1.0"
lazy_static = "1.4"
libc = { version = "^0.2", default-features = false }
serde = { version = "1", optional = true, features = ["derive"] }
thiserror = "1"
typetag = { version = "0.1", optional = true }
paste = "1.0"
Expand Down Expand Up @@ -80,6 +79,10 @@ 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"]

# Deprecated features.
jit = ["compiler"]
Expand Down
36 changes: 35 additions & 1 deletion lib/cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ wasmer-wasi-experimental-io-devices = { version = "=3.0.0-alpha.4", path = "../w
wasmer-wast = { version = "=3.0.0-alpha.4", path = "../../tests/lib/wast", optional = true }
wasmer-cache = { version = "=3.0.0-alpha.4", path = "../cache", optional = true }
wasmer-types = { version = "=3.0.0-alpha.4", path = "../types" }
wasmer-object = { version = "=3.0.0-alpha.4", path = "../object" }
wasmer-object = { version = "=3.0.0-alpha.4", path = "../object", optional = true }
wasmer-vfs = { version = "=3.0.0-alpha.4", path = "../vfs", default-features = false, features = ["host-fs"] }
atty = "0.2"
colored = "2.0"
Expand Down Expand Up @@ -66,6 +66,8 @@ default = [
"wasi",
"emscripten",
"compiler",
"wasmer-artifact-create",
"static-artifact-create",
]
cache = ["wasmer-cache"]
cache-blake3-pure = ["wasmer-cache/blake3-pure"]
Expand All @@ -77,6 +79,29 @@ compiler = [
"wasmer-compiler/translator",
"wasmer-compiler/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",
]
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"
Expand All @@ -97,3 +122,12 @@ debug = ["fern", "log", "wasmer-wasi/logging"]
disable-all-logging = ["wasmer-wasi/disable-all-logging"]
headless = []
headless-minimal = ["headless", "disable-all-logging", "wasi"]

# Optional
enable-serde = [
"wasmer/enable-serde",
"wasmer-vm/enable-serde",
"wasmer-compiler/enable-serde",
"wasmer-types/enable-serde",
"wasmer-wasi/enable-serde",
]
Loading