Change the unsafe API from `pub(crate)` to `pub`/`pub unsafe`.
Is your feature request related to a problem? Please describe. I was working on support for the Orc JIT engine, and I came to a point where I needed to create an LLVMString, but I didn't have the capability because all of the creation functions were private to the inkwell crate, and I was working from a separate experiments crate. It makes sense to me to keep the unsafe API public so that inkwell can be extended by other crates.
Describe the solution you'd like Make all of the unsafe API in inkwell public.
Describe possible drawbacks to your solution In a sense, it could change the meaning of "safe wrapper" by making all of these things open, but perhaps it could be a feature flag.
Describe alternatives you've considered The only other alternative is to make my own types, but that may not be ideal.
I don't follow; the Orc JIT is in Inkwell, so why does LLVMString need to be externally createable?
At first, I was working on Orc JIT in an experimental repo. It made me realize that there might be someone that would want to implement their own extensions to inkwell, but they would have trouble without access to the private api.
In general I've started opening up types' new methods to be public, but it's not clear to me how that would be useful for LLVMString - the type's intention is purely for getting strings from llvm, not so much creating your own
In general I've started opening up types' new methods to be public, but it's not clear to me how that would be useful for LLVMString - the type's intention is purely for getting strings from llvm, not so much creating your own It's useful when you already have a C string produced by LLVM and you want to give it a safe wrapper.