Skip to content

Latest commit

 

History

History
37 lines (23 loc) · 743 Bytes

README.md

File metadata and controls

37 lines (23 loc) · 743 Bytes

Libffi.jl

This repository provides Julia bindings for libffi.

Installation

julia> import Pkg
julia> Pkg.add("https://github.com/fatteneder/Libffi.jl")

Usage

This package provides an LLVM independent @ccall mechanism based on libffi. You can use it as:

julia> import Libffi; Libdl

julia> libc = Libdl.dlopen("libc.so.6")

julia> p_clock = Libdl.dlsym(libc, :clock)

julia> cif = Libffi.Ffi_cif(Cint, ());

julia> Libffi.ffi_call(cif, p_clock, [])
22950370

References

TODO

  • Implement a version of ffi_call that caches cfi.
  • Implement a Libffi.@ccall macro.