mirror of
https://github.com/aljazceru/turso.git
synced 2026-02-11 11:14:21 +01:00
Generate C header file on cargo build
This commit is contained in:
3
core/mvcc/.gitignore
vendored
3
core/mvcc/.gitignore
vendored
@@ -1,2 +1,3 @@
|
||||
target/
|
||||
Cargo.lock
|
||||
bindings/c/include
|
||||
target/
|
||||
|
||||
6
core/mvcc/bindings/c/build.rs
Normal file
6
core/mvcc/bindings/c/build.rs
Normal file
@@ -0,0 +1,6 @@
|
||||
use std::path::Path;
|
||||
|
||||
fn main() {
|
||||
let header_file = Path::new("include").join("mvcc.h");
|
||||
cbindgen::generate(".").expect("Failed to generate C bindings").write_to_file(header_file);
|
||||
}
|
||||
6
core/mvcc/bindings/c/cbindgen.toml
Normal file
6
core/mvcc/bindings/c/cbindgen.toml
Normal file
@@ -0,0 +1,6 @@
|
||||
language = "C"
|
||||
cpp_compat = true
|
||||
include_guard = "MVCC_H"
|
||||
line_length = 120
|
||||
no_includes = true
|
||||
style = "type"
|
||||
Reference in New Issue
Block a user