Skip to content

axiolid-capi ​

Versioned, memory-safe C ABI for the Axiolid application facade.

Latest release0.4.0 (2026-11-13)
crates.ioaxiolid-capi
Layerfacade (facade.native-c)
API documentationrustdoc · docs.rs
Sourcecrates/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, AxiolidExactness and AxiolidGeometryKind gain 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_patch 1).

Added ​

  • Visible faces through the C ABI (#386): axiolid_v0_4_visible_faces with AxiolidVisibleFaceLimits; the result is read with axiolid_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. AxiolidFaceSource distinguishes group regions from near-plane caps, AxiolidGeometryKind gains VisibleFaces, and the capability table lists MeshVisibleFaces. 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_lines with AxiolidView, AxiolidViewMesh (roles, group modes including planar), AxiolidEdgeSelection (including group boundaries) and AxiolidHiddenLineLimits; the result is read with axiolid_v0_4_hidden_lines_count, _copy and _evidence. axiolid_v0_4_context_last_error_mesh returns the id of the input mesh a refusal names. AxiolidOperation gains MeshHiddenLines and MeshVisibleFaces, AxiolidGeometryKind gains HiddenLines, and the capability table lists MeshHiddenLines. All arguments are validated at the boundary. abi_patch is 1; existing symbols and layouts are unchanged.

Full history: crates/facade/axiolid-capi/CHANGELOG.md

Released under the Mozilla Public License 2.0.