suggestion: ability to read C string for FFI #12752
Labels
FFI
Related to Foreign Function Interface APIs
suggestion
suggestions for new features (yet to be agreed)
Suggestion
A
readCString
or similar function in maybeDeno.DynamicLibrary
that accepts a pointer (asBigInt
) and returns the C String.Why?
When working with FFI, it's pretty common to use C strings. But in case of Deno FFI it's not possible to do that without a helper function. Right now I'm interacting with a native library directly using Deno FFI (without wrapping it) and I have to make such helper function by making another native library.
Why function and not a string return type?
Only being able to read C strings returned from some function is limiting in my case. In the dylib I'm using, some functions write a C String pointer to a
char**
instead.The text was updated successfully, but these errors were encountered: