Skip to content

Safe rust interface

Aaron Councilman requested to merge safe-rust-interface into main

Resolves #19 (closed).

What's done so far:

  • Implemented a thread-safe HerculesImmBox which provides a standard interface for creating inputs to Hercules functions and handling their outputs in a safe manner.
  • Using HerculesImmBox in cava and edge detection, which significantly cleaned up the code
  • Implemented a HerculesMutBox which provides a standard interface but for mutable references. Not actually sure whether this is ever needed.

ToDo:

  • I think we should generate a safer function for the runner which accepts as inputs HerculesImmBux/HerculesMutBox and returns the same, since these boxes are typed and so it improves type-safety (it also removes most the remaining weirdness of the interface, specifically the .to())

Merge request reports

Loading