| ▲ | SkiFire13 a day ago | |
It's not a strict prerequisite, you can just require the library being distributed to use extern "C". | ||
| ▲ | gspr a day ago | parent | next [-] | |
Well yes, but then your interface is a C ABI. That's fantastic if the side using my library is any language where C is the only common ground. When the application side is Rust though, it leaves a lot to be desired. It would be delicious to actually interface in a way that respects Rust! Hell, even if all exposed functions and types would need to be fully monomorphized at the interface, it would be a lot nicer to pass a `&'a [i64]` rather than a `const * int64_t` together with a `size_t n` and have to marshall the slice on both sides. | ||
| ▲ | Xirdus a day ago | parent | prev [-] | |
Or to put it another way, it is a strict prerequisite and Rust already meets it via extern "C". | ||