axiolid-capi
Versioned, memory-safe C ABI for the Axiolid application facade.
| Latest release | 0.4.0 (2026-11-13) |
| crates.io | axiolid-capi |
| Layer | facade (facade.native-c) |
| API documentation | rustdoc · docs.rs |
| Source | crates/facade/axiolid-capi/ |
Overview
A versioned C ABI over the axiolid::application facade, for C and C++ applications. Every symbol carries the axiolid_v0_4_ prefix; results are reached through scalar handles owned by a context, data is copied into caller-sized buffers so no Rust allocation crosses the boundary, and no function unwinds. Exact and triangle-mesh results are distinguishable, and an unsupported exact operation is refused rather than tessellated. The C header is generated from the Rust surface into include/axiolid.h. This is the only Axiolid crate that contains unsafe code. See ADR 0040.
Depends on
Changes
Latest release, 0.4.0 (2026-11-13):
Changed
- Breaking for Rust callers only. The public C-mirroring enums
AxiolidStatus,AxiolidOperation,AxiolidRepresentation,AxiolidExactnessandAxiolidGeometryKindgain variants (MeshHiddenLines,MeshVisibleFaces,HiddenLines) and are now#[non_exhaustive], so later C-ABI-additive variants are no longer Rust breaks. The C ABI is unchanged and additive (abi_patch1).
Added
- Visible faces through the C ABI (#386):
axiolid_v0_4_visible_faceswithAxiolidVisibleFaceLimits; the result is read withaxiolid_v0_4_visible_faces_counts,_copy(regions, rings, points and triangle indices as flat offset-indexed tables, nothing written unless every capacity covers its count) and_evidence.AxiolidFaceSourcedistinguishes group regions from near-plane caps,AxiolidGeometryKindgainsVisibleFaces, and the capability table listsMeshVisibleFaces. Arguments, refusals and mesh ids behave as for hidden lines. Existing symbols and layouts are unchanged. - Hidden lines through the C ABI (#473):
axiolid_v0_4_hidden_lineswithAxiolidView,AxiolidViewMesh(roles, group modes including planar),AxiolidEdgeSelection(including group boundaries) andAxiolidHiddenLineLimits; the result is read withaxiolid_v0_4_hidden_lines_count,_copyand_evidence.axiolid_v0_4_context_last_error_meshreturns the id of the input mesh a refusal names.AxiolidOperationgainsMeshHiddenLinesandMeshVisibleFaces,AxiolidGeometryKindgainsHiddenLines, and the capability table listsMeshHiddenLines. All arguments are validated at the boundary.abi_patchis 1; existing symbols and layouts are unchanged.
Full history: crates/facade/axiolid-capi/CHANGELOG.md