Comments (5)
Other support functions requiring callbacks and/or void pointers:
- LLVMAddSymbol:
- LLVMSearchForAddressOfSymbol:
- LLVMLoadLibraryPermanently: 355a238
- LLVMParseCommandLineOptions:
- LLVMInstallFatalErrorHandler: f9902c6
- LLVMContextSetDiagnosticHandler
- LLVMContextSetYieldCallback
- LLVMGetDiagInfoDescription
- LLVMGetDiagInfoSeverity
from inkwell.
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?
from inkwell.
I'm working on add_symbol
right now, and actually got it working! However, there is a bug when running all tests.
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.
from inkwell.
Alright, add_symbol
has a bug when it is used more than once in a single process, but add_global_mapping
DOES work! I'm gonna push a new commit.
In any case, is there a reason why tests.rs
exists? With this file, every test is passed twice.
from inkwell.
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!
from inkwell.
Related Issues (20)
- Question: How to get the size of a type during LLVM generation? HOT 4
- Add `typos` to CI
- Create new fine-grained enum for `build_cast` HOT 1
- How to link library to jit? HOT 2
- Support llvm 17 HOT 1
- Add support for `global_ctor` HOT 4
- Add support for `global_ctor` HOT 3
- ORC support HOT 1
- Const struct member access HOT 1
- Segfault when using `module.create_jit_execution_engine()` HOT 2
- Named keys on debug struct types HOT 1
- Adding get_allocated_type, is_terminator and is_conditional to InstructionValue HOT 1
- Add a function to add llvm ir directly HOT 1
- after importing LLVM IR, a segmentation fault occurs when calling its internal method HOT 2
- Restricting build_*_gep to make it safer. HOT 1
- Add more constants for dwarf flags HOT 2
- Implement `Clone + Copy` for `ContextRef` HOT 2
- Support for `llvm::orc2::LLJit` HOT 1
- Solution: Inkwell Rust LLVM_SYS not set VSCODE
- `UnsafeFunctionPointer::Args` as a convienence. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from inkwell.