Files
solidcraft/crates/kernel/Cargo.toml
T
Brennen HerbruckandClaude Opus 5.5 8695af8acc solidcraft-smlib: SMLib statically linked behind its C API, with a safe wrapper
A new crate (L1, only the kernel uses it) builds tangency-labs/smlib's SMLib,
SM_API and C API with the cc crate when its `native` feature is on, from the
commit in crates/smlib/SMLIB_REV (scripts/fetch-smlib.sh fetches just those
sources). The kernel's `smlib` feature turns it on. Without it nothing C++
is built and every call returns NotBuilt, so workspace builds need no C++
toolchain.

unsafe is confined to src/ffi.rs. The wrapper owns handles, maps statuses to
errors, checks the C API version, and sends SMLib's per-call log to the log
crate. Crash reports note the native kernel call in flight.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 02:28:44 -04:00

39 lines
1.4 KiB
TOML

[package]
name = "solidcraft-kernel"
description = "SolidCraft B-rep kernel boundary: solids, extrude/revolve/booleans/fillets, tessellation, measures and STEP, behind our own API (implemented with truck)"
version.workspace = true
edition.workspace = true
license.workspace = true
[lints]
workspace = true
[features]
# Link NVIDIA's SMLib (tangency-labs/smlib) into the kernel; needs a C++ toolchain and
# scripts/fetch-smlib.sh (ADR 0002).
smlib = ["dep:solidcraft-smlib", "solidcraft-smlib/native"]
[dependencies]
solidcraft-geom = { workspace = true }
solidcraft-smlib = { workspace = true, optional = true }
serde = { workspace = true }
serde_json = { workspace = true }
thiserror = { workspace = true }
log = { workspace = true }
truck-modeling = { workspace = true }
truck-shapeops = { workspace = true }
truck-meshalgo = { workspace = true }
truck-stepio = { workspace = true }
truck-topology = { workspace = true }
spade = { workspace = true }
web-time = { workspace = true }
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
rayon = { workspace = true }
[dev-dependencies]
# The vendored crate tests never build in CI, so its equivalence checks run from kernel tests.
# Resolver 3 keeps this dev-only feature out of shipped builds.
truck-meshalgo = { workspace = true, features = ["test-hooks"] }
proptest = { version = "1", default-features = false, features = ["std"] }