TheDan64 / inkwell

It's a New Kind of Wrapper for Exposing LLVM (Safely)
https://thedan64.github.io/inkwell/
Apache License 2.0
2.32k stars 224 forks source link

How to link library to jit? #443

Closed gavrilikhin-d closed 1 year ago

gavrilikhin-d commented 1 year ago

Is it possible to link libraries to jit instead of adding global mappings?

gavrilikhin-d commented 1 year ago

I see there is load_library_permanently function, but even after using it with a.dylib file, I still get segfaults

gavrilikhin-d commented 1 year ago

It actually works!

I was confused by bool in return type. I thought true means success, actually it's vice-versa. I'd suggest changing return type to Result<(), ()> at least.

...and add some documentation