-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
@kokyriakidis let's continue here from #9.
So calling Rust from C is relatively straightforward, see here.
We could make a crate simd-minimizers-c where we expose a #[unsafe(no_mangle)] pub extern "C" api that simply forwards to the right functions from the root of the library, with the most important template instantiations.
Would you also like to use PackedSeq input? or just plain ascii text?
I will be out for a week and anyway pretty busy. If you could give this a try yourself that would be great!
- Do
cargo new simd-minimizers-cfrom the root - Change to
[lib] crate-type=['cdylib'], addsimd-minimizersas a dependency, and wrap the functions you need. - Then define a header with corresponding
extern void ...functions and include that from your code. - Lastly build the C code and link against this header.
The c header can also be generated using cbindgen.
Metadata
Metadata
Assignees
Labels
No labels