1# LibCEED.jl: Julia Interface for [libCEED](https://github.com/CEED/libCEED) 2 3## Installation 4 5When the LibCEED.jl package is built, it requires the environment variable 6`JULIA_LIBCEED_LIB` to be set to the location of the compiled libCEED shared 7library. 8 9For example, the package can be installed by: 10```julia 11% JULIA_LIBCEED_LIB=/path/to/libceed.so julia 12julia> # press ] to enter package manager 13 14(@v1.5) pkg> add LibCEED 15``` 16or, equivalently, 17```julia 18% julia 19 20julia> withenv("JULIA_LIBCEED_LIB" => "/path/to/libceed.so") do 21 Pkg.add("LibCEED") 22end 23``` 24 25 26## Usage 27 28This package provides both a low-level and high-level interface for libCEED. 29 30### Low-Level Interface 31 32The low-level interface (provided in the `LibCEED.C` module) is in one-to-one 33correspondence with the C libCEED iterface, and is automatically generated (with 34some minor manual modifications) using the Julia package Clang.jl. The script 35used to generate bindings is available in `generate_bindings.jl`. 36 37With the low-level interface, the user is responsible for freeing all allocated 38memory (calling the appropriate `Ceed*Destroy` functions). This interface is 39not type-safe, and calling functions with the wrong arguments can cause libCEED 40to crash. 41 42### High-Level Interface 43 44The high-level interface provides a more idiomatic Julia interface to the 45libCEED library. Objects allocated using the high-level interface will 46automatically be destroyed by the garbage collector, so the user does not need 47to manually manage memory. 48 49See the documentation for more information. 50