-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Access to foreign function interface (FFI)? #15
Comments
Yes, I have plans on implementing it such that |
I wonder if the current dichotomy between HushFun and RustFun in src/runtime/value/function.rs can also handle out of the box functions en provenance from the C ABI? Since a C function is typified by barely much more than a void pointer, I somehow suspect that memory allocated by such C functions will be very difficult to deallocate by the Hush shell. If the user doesn't free it manually, I think that the process will simply leak memory. Rust itself considers native C code to be fundamentally unsafe. That point is certainly conceded, but we still need to somehow reuse external native code. For example, using GTK or QT will always potentially leak memory. We would still benefit from these things being available, regardless of their unsafety ... |
Makes sense to me. I guess we could add an |
Yes! |
Would it be possible to expose Rust's FFI functionality for invoking (over the C ABI) functions located in external libraries?
https://doc.rust-lang.org/nomicon/ffi.html
That would allow hush shell users to use a world of existing software.
The text was updated successfully, but these errors were encountered: