-
Notifications
You must be signed in to change notification settings - Fork 98
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
Alternative and more direct way to interface to p4est/t8code #1182
Comments
Would the resulting code be substantially different from code generated via Clang.jl? |
I do not know. Haven't looked into Clang.jl. |
Yeah. The mental model of the Clang.jl approach is also very similar - we would just use Clang.jl to generate an initial Julia wrapper that we can tune manually to our needs from there on. It should just remove a bit of tedious manual work. But I am totally open to skip this step, too, if it's simpler. |
What's your take on this, @sloede? |
One potential advantage of Clang.jl is that it also handles macros (at least "sane" ones) and Another potential advantage of Clang.jl-generated bindings is that the bindings are actually "human readable" with concrete line numbers, which makes it potentially easier to debug them. I wonder what kind of error message you get right now if, e.g., you use a wrong argument type, and if it is still possible for a non-expert user to understand what needs to be changed to fix it. |
You implement and document macros and structs manually. This works just fine.
Not exactly sure what you mean by that, but I get the feeling that this statement contests the use of macros in Julia. :)
The error message is not that bad. Not on point, but with proper documentation the user will steer through the swamp. Example:
At least you get the proper name of the routine and you can then look up the correct use in the documentation. |
We're using |
This issue is just FYI and open for discussion.
Idea: Instead of relying on 3rd-party packages for generating interfaces to C libraries we
write them "manually" by ourself and are indepentent and have direct control. Compilation
is much faster (nearly non-existent), too.
I also pieced together a macro for convient function signature description.
An example how this looks like can be found under:
https://github.com/jmark/T8code.jl/blob/main/examples/playground/2d_box_ccall.jl
The text was updated successfully, but these errors were encountered: