openbim_ifc_dotnet/
lib.rs

1//! The `OpenBim.Ifc` NuGet package: .NET bindings for `openbim-ifc` (#327).
2//!
3//! The binding is C#, in `dotnet/OpenBim.Ifc/`: P/Invoke over the versioned
4//! C ABI of `openbim-ifc-capi` (`openbim_ifc_v0_1_*`), whose shared library
5//! the package ships per runtime identifier under `runtimes/<rid>/native/`.
6//! It adds calling-convention glue only (ADR 0013): every refusal and every
7//! error code comes from the same Rust core the other bindings use.
8//!
9//! This crate holds no Rust binding code. It exists so the package has what
10//! every other binding has -- a version in a manifest the release tooling
11//! reads, a changelog, a `openbim-ifc-dotnet-v*` release tag and a reference
12//! page -- and so its tests can hold the C# source to the two contracts it
13//! depends on without a .NET SDK:
14//!
15//! - every `openbim_ifc_v0_1_*` function and status code of the C header is
16//!   declared in `Native/NativeMethods.cs` with the header's parameter
17//!   types, and every struct with its fields in order;
18//! - every domain record of the shared binding core has a C# record with
19//!   the same fields in the same order, since a record crosses the C ABI as
20//!   a `LIST` of its field values with no names.
21//!
22//! The behaviour is tested from C# against the packed `.nupkg` by
23//! `scripts/check-dotnet.py`.
24
25/// The NuGet package id.
26pub const PACKAGE_ID: &str = "OpenBim.Ifc";