How to handle light wrapper packages generated by Clang.jl?

mkitti
Wed, 27 Dec 2023 21:51:49 +0000
Package Management

Using Clang.jl, Julia bindings can made quite easily using Clang.jl. While this is almost automatic, it does require some manual fine tuning to work.

Below are some examples of such packages. In the case of LibTIFF.jl and LibHDF5.jl, I made this mostly as development tools for myself to explore the C APIs. For Zstandard, I embedded this within CodecZstd.jl. It occurs to me that these may have some utility for others.

Would it make sense to register packages such as LibTIFF.jl or LibHDF5.jl? Alternatively, would it be better to embed them in other packages that already use the JLL? or use another registry?

GitHub

GitHub - mkitti/LibTIFF.jl: Clang.jl generated wrapper around Libtiff_jll.jl

Clang.jl generated wrapper around Libtiff_jll.jl. Contribute to mkitti/LibTIFF.jl development by creating an account on GitHub.

GitHub

GitHub - mkitti/LibHDF5.jl: HDF5 bindings for Julia using Clang.jl

HDF5 bindings for Julia using Clang.jl. Contribute to mkitti/LibHDF5.jl development by creating an account on GitHub.

github.com

JuliaIO/CodecZstd.jl/blob/master/src/LibZstd_clang.jl

module LibZstd

using Zstd_jll
export Zstd_jll

const INT_MAX = typemax(Cint)
const size_t = Int64

ZSTD_EXPAND_AND_QUOTE(expr) = string(expr)


function ZDICT_trainFromBuffer(dictBuffer, dictBufferCapacity, samplesBuffer, samplesSizes, nbSamples)
    ccall((:ZDICT_trainFromBuffer, libzstd), Csize_t, (Ptr{Cvoid}, Csize_t, Ptr{Cvoid}, Ptr{Csize_t}, Cuint), dictBuffer, dictBufferCapacity, samplesBuffer, samplesSizes, nbSamples)
end

struct ZDICT_params_t
    compressionLevel::Cint
    notificationLevel::Cuint
    dictID::Cuint
end

This file has been truncated. show original

1 post - 1 participant