thomashart17 / c-rust

Repo for hosting examples of interoperability of rust and C using LLVM 14.
0 stars 2 forks source link

Locally defined sea_nd functions #6

Closed agurfinkel closed 1 year ago

agurfinkel commented 1 year ago

See add job for an example

New macro, define_sea_nd! that should be used to define non-deterministic functions locally in Rust. The goal is to not require creating such functions in C and call them externally from Rust.

The trick is to create a body of a sea_nd function that is complex enough for inter-procedural optimizer to give up.