3 ms·
Do you have plans for handling C FFI without "unsafe"? Will it require some sort of extension module written in C/C++/Rust?
by ChrisSD 10mo ago
Do you have plans for handling C FFI without "unsafe"? Will it require some sort of extension module written in C/C++/Rust?
- steveklabnik 10mo agoNo direct plans. For the immediate future, only the runtime is allowed to call into C. If this ever becomes a production thing, then I can worry about FFI, and I'll probably just follow what managed languages do here.
- tracker1 10mo agoFWIW, I really like the way C# has approached this need... most usage is exposed via attribute declaration/declaration DllImport for P/Invoke. Contrasted with say JNI in Java or even the Go syntax. The only thing that might be a significant improvement would be an array/vector of lookup names for the library on the system given how specific versions are often tagged in Linux vs Windows.