Nomad changes
All checks were successful
Deploy fil (kreuzberg) / deploy (push) Successful in 49s

This commit is contained in:
Henrik Jess Nielsen
2026-06-01 23:40:55 +02:00
parent 72b1a0a6ed
commit b4c07d3693
5723 changed files with 1130655 additions and 0 deletions

23
crates/kreuzberg-ffi/build.rs generated Normal file
View File

@@ -0,0 +1,23 @@
// This file is auto-generated by alef. DO NOT EDIT.
// alef:hash:4e15143f4af1ae8bafbdb1506ef057da924484c66a19483966333558ad437e75
fn main() {
let crate_dir = std::env::var("CARGO_MANIFEST_DIR").unwrap();
cbindgen::generate(crate_dir)
.expect("Unable to generate C bindings")
.write_to_file("include/kreuzberg.h");
// Set @rpath-relative install_name on macOS so the cdylib can be relocated
// (bundled into language packages like packages/go/.lib/<rid>/, packages/
// java/src/main/resources/natives/<rid>/, etc.) and located via the consumer
// binary's rpath at runtime. Without this, the install_name embeds the CI
// runner build path (`/Users/runner/work/.../target/.../deps/lib<name>.dylib`)
// and dyld fails to load the bundled copy from its actual location.
if std::env::var("CARGO_CFG_TARGET_OS").as_deref() == Ok("macos") {
println!("cargo:rustc-link-arg-cdylib=-Wl,-install_name,@rpath/libkreuzberg_ffi.dylib");
}
let go_include_dir = std::path::Path::new("../../../packages/go/v5/include");
std::fs::create_dir_all(go_include_dir).expect("Unable to create Go include directory");
std::fs::copy("include/kreuzberg.h", go_include_dir.join("kreuzberg.h"))
.expect("Unable to copy header to Go include directory");
}