anise icon indicating copy to clipboard operation
anise copied to clipboard

Expose Almanac to C++

Open ChristopherRabotin opened this issue 11 months ago • 0 comments

High level description

As a stakeholder, I need the Almanac structure to be exposed to C++ so that file loading can be performed from C++ code.

Requirements

Expose the Almanac structure and the associated load function to C++ using the cxx Rust crate. The Rust load function takes a string and returns a copy of the Almanac using move semantics. It is critical to ensure that the move semantics do not lead to memory leaks when used from C++.

Test plans

  • Implement C++ bindings for the Almanac structure.
  • Expose the load function so that it is accessible in C++.
  • Ensure that the Rust-side move semantics are preserved and do not cause memory leaks.
  • Write C++ tests that verify the expected behavior and absence of memory leaks.
  • Update the documentation with C++ usage examples and any caveats regarding memory management.

ChristopherRabotin avatar Mar 06 '25 03:03 ChristopherRabotin