Skip to main content

Crate ifc_lite_ffi

Crate ifc_lite_ffi 

Source
Expand description

C FFI bindings for ifc-lite.

Exports functions for use via P/Invoke from C#:

  • ifc_lite_parse: parse an IFC file and return JSON bytes
  • ifc_lite_parse_ex: parse with configurable opening filter
  • ifc_lite_free: free a buffer previously returned by parse functions

Build: cargo build --profile server-release -p ifc-lite-ffi Output: target/server-release/ifc_lite_ffi.dll

The server-release profile is mandatory, not a convenience: the workspace default release profile sets panic = 'abort', which turns the catch_unwind guards below into no-ops. Built that way, a parser panic aborts the entire host CAD process instead of returning error code 3. server-release inherits release but restores panic = "unwind".

Functions§

ifc_lite_free
Free a buffer previously returned by ifc_lite_parse or ifc_lite_parse_ex.
ifc_lite_parse
Parse an IFC file and return JSON bytes.
ifc_lite_parse_ex
Parse an IFC file with a configurable opening filter and return JSON bytes.