Skip to content

Commit e69274e

Browse files
committed
Provide paths to c-api headers as cargo links metadata
1 parent e7f70e1 commit e69274e

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

crates/c-api/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ license = "Apache-2.0 WITH LLVM-exception"
77
repository = "https://github.com/bytecodealliance/wasmtime"
88
readme = "README.md"
99
edition.workspace = true
10+
links = "wasmtime-c-api"
11+
include = ["include", "src", "wasm-c-api/include", "build.rs"]
1012

1113
[lints]
1214
workspace = true

crates/c-api/build.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
fn main() {
2+
let dir = std::env::var("CARGO_MANIFEST_DIR").unwrap();
3+
println!("cargo:include={dir}/include");
4+
println!("cargo:wasm_include={dir}/wasm-c-api/include");
5+
}

0 commit comments

Comments
 (0)