diff --git a/Cargo.lock b/Cargo.lock index 9399c8538603..014c5210751b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3339,6 +3339,13 @@ dependencies = [ "wat", ] +[[package]] +name = "wasmtime-c-api-artifact" +version = "15.0.0" +dependencies = [ + "wasmtime-c-api", +] + [[package]] name = "wasmtime-c-api-macros" version = "0.0.0" diff --git a/Cargo.toml b/Cargo.toml index b2b3f3b3cb7e..9b612a34f2a0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -101,7 +101,7 @@ members = [ "cranelift/isle/islec", "cranelift/serde", "crates/bench-api", - "crates/c-api", + "crates/c-api/artifact", "crates/environ/fuzz", "crates/test-programs", "crates/wasi-preview1-component-adapter", diff --git a/ci/build-release-artifacts.sh b/ci/build-release-artifacts.sh index 71c7888395cd..0a4d3e9f21b0 100755 --- a/ci/build-release-artifacts.sh +++ b/ci/build-release-artifacts.sh @@ -37,4 +37,4 @@ else fi cargo build --release $flags --target $target -p wasmtime-cli $bin_flags -cargo build --release $flags --target $target -p wasmtime-c-api +cargo build --release $flags --target $target -p wasmtime-c-api-artifact diff --git a/crates/c-api/Cargo.toml b/crates/c-api/Cargo.toml index 1548b0634dca..62cd30301840 100644 --- a/crates/c-api/Cargo.toml +++ b/crates/c-api/Cargo.toml @@ -10,8 +10,6 @@ edition.workspace = true publish = false [lib] -name = "wasmtime" -crate-type = ["staticlib", "cdylib", "rlib"] doc = false test = false doctest = false @@ -38,16 +36,6 @@ wasi-common = { workspace = true, optional = true } futures = { workspace = true, optional = true } [features] -default = [ - 'profiling', - 'wat', - 'wasi', - 'cache', - 'parallel-compilation', - 'async', - 'coredump', - 'addr2line', -] async = ['wasmtime/async', 'futures'] profiling = ["wasmtime/profiling"] cache = ["wasmtime/cache"] diff --git a/crates/c-api/artifact/Cargo.toml b/crates/c-api/artifact/Cargo.toml new file mode 100644 index 000000000000..d34841b1bede --- /dev/null +++ b/crates/c-api/artifact/Cargo.toml @@ -0,0 +1,42 @@ +[package] +name = "wasmtime-c-api-artifact" +version.workspace = true +authors.workspace = true +description = "C API to expose the Wasmtime runtime" +license = "Apache-2.0 WITH LLVM-exception" +repository = "https://github.com/bytecodealliance/wasmtime" +readme = "README.md" +edition.workspace = true +publish = false + +[lib] +name = "wasmtime" +crate-type = ["staticlib", "cdylib"] +doc = false +test = false +doctest = false + +[dependencies] +wasmtime-c-api = { path = '..' } + +[features] +default = [ + 'profiling', + 'wat', + 'wasi', + 'cache', + 'parallel-compilation', + 'async', + 'coredump', + 'addr2line', +] +async = ['wasmtime-c-api/async'] +profiling = ["wasmtime-c-api/profiling"] +cache = ["wasmtime-c-api/cache"] +parallel-compilation = ['wasmtime-c-api/parallel-compilation'] +wasi = ['wasmtime-c-api/wasi'] +logging = ['wasmtime-c-api/logging'] +disable-logging = ["wasmtime-c-api/disable-logging"] +coredump = ["wasmtime-c-api/coredump"] +addr2line = ["wasmtime-c-api/addr2line"] +wat = ["wasmtime-c-api/wat"] diff --git a/crates/c-api/artifact/src/lib.rs b/crates/c-api/artifact/src/lib.rs new file mode 100644 index 000000000000..43929bb8605f --- /dev/null +++ b/crates/c-api/artifact/src/lib.rs @@ -0,0 +1 @@ +pub use wasmtime_c_api::*;