-
Notifications
You must be signed in to change notification settings - Fork 227
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
Add wrappers for support functions #17
Comments
Adding a support module is a good idea. I already started a couple supporty methods in lib.rs (even though they don't come from llvm_sys' support.rs), so those should probably get moved. I really want Inkwell to be as safe as possible, unless there's absolutely nothing we can do (see ExecutionEngine.get_function_address() for example). I think for a lot of these support methods that take a void pointer, we should be able to research what types of data is generally used in C/++, and provide a safe wrapper for those data types and allow them to be passed into these methods and turn them into void pointers behind the scenes as needed. (Though I'm not familiar with your example functions in particular, so I'm just speculating) What exactly are you trying to do with these methods? |
Other support functions requiring callbacks and/or void pointers: |
I'm working on I think I'm having an LLVM bug here, and not an Inkwell / Rust bug. Basically, I can add one symbol, but once an EE has been created, adding other symbols does not register them for resolution. Really weird issue. |
Alright, In any case, is there a reason why |
Oh, interesting! I thought tests.rs was needed, like a mod.rs. I'll remove it in my next commit to master since it might break code coverage which looks for the tests binary. Thanks! |
It would be nice to have "Rust-friendly" (I doubt "safe" is a good word) wrappers around the methods found in
llvm_sys::support
, namely:LLVMAddSymbol
LLVMSearchForAddressOfSymbol
LLVMLoadLibraryPermanently
LLVMParseCommandLineOptions
(a bit less useful)However, I can't make it work in any way. I created
support.rs
with the following content, but I can't make a single test that actually succeeds.I also tried the following for
add_symbol
, which didn't work either.The text was updated successfully, but these errors were encountered: