Current section
Files
Jump to
Current section
Files
native/condukt_microsandbox/Cargo.toml
[package]
name = "condukt_microsandbox"
version = "0.1.0"
edition = "2024"
license = "MIT"
description = "Rustler NIF wrapping microsandbox for Condukt"
publish = false
[lib]
name = "condukt_microsandbox"
crate-type = ["cdylib"]
[dependencies]
rustler = { version = "0.36", default-features = false, features = ["derive"] }
microsandbox = { version = "0.4.6", default-features = false, features = ["prebuilt"] }
tokio = { version = "1", features = ["rt", "rt-multi-thread", "time"] }
[features]
default = ["nif_version_2_16"]
nif_version_2_15 = ["rustler/nif_version_2_15"]
nif_version_2_16 = ["rustler/nif_version_2_16"]
nif_version_2_17 = ["rustler/nif_version_2_17"]
[profile.release]
# `lto = "thin"` combined with this crate's C-heavy dependency tree
# (aws-lc-sys, ring, sqlite3-sys, bzip2-sys, zstd-sys, libcap-ng) leaves
# `.fini_array` entries whose RELATIVE relocations resolve to `load_base + 0`.
# At process exit, `_dl_fini` walks the array and dereferences the first slot,
# jumping to the .so's ELF header and segfaulting (`#0 ?? from
# condukt_microsandbox.so` in `_dl_fini` at dl-fini.c:114). `_dl_init` skips
# null entries so load itself is fine. Disabling LTO restores the real
# destructor addresses; size cost is acceptable for a NIF this size.
lto = false
codegen-units = 1
strip = "symbols"