Hacker News new | ask | show | jobs
by markkitti 907 days ago
Are there solid C interfaces that can be used?

A large part of why I started using Julia is because calling into other languages through the C FFI is pretty easy and efficient. Most of the wrappers are a single line. If there is not existing driver support, I would pass the C headers through Clang.jl, which automatically wraps the C API in a C header.

https://github.com/JuliaInterop/Clang.jl

I most recently did this with libtiff. Here is the Clang.jl code to generate the bindings. It's less than 30 lines of sterotypical code.

https://github.com/mkitti/LibTIFF.jl/tree/main/gen

The generated bindings with a few tweaks is here:

https://github.com/mkitti/LibTIFF.jl/blob/main/src/LibTIFF.j...

1 comments

Yes, both Oracle (OCI) and SQL Server (ODBC), although they are quite a bit low level.