1 // Copyright (c) 2017, Lawrence Livermore National Security, LLC. Produced at 2 // the Lawrence Livermore National Laboratory. LLNL-CODE-734707. All Rights 3 // reserved. See files LICENSE and NOTICE for details. 4 // 5 // This file is part of CEED, a collection of benchmarks, miniapps, software 6 // libraries and APIs for efficient high-order finite element and spectral 7 // element discretizations for exascale applications. For more information and 8 // source code availability see http://github.com/ceed. 9 // 10 // The CEED research is supported by the Exascale Computing Project 17-SC-20-SC, 11 // a collaborative effort of two U.S. Department of Energy organizations (Office 12 // of Science and the National Nuclear Security Administration) responsible for 13 // the planning and preparation of a capable exascale ecosystem, including 14 // software, applications, hardware, advanced system engineering and early 15 // testbed platforms, in support of the nation's exascale computing imperative 16 17 //! # libCEED Rust Interface 18 //! 19 //! This is the documentation for the low level Rust bindings to the libCEED C interface. 20 //! See the full libCEED user manual [here](https://libceed.readthedocs.io). 21 //! 22 //! libCEED is a low-level API for for the efficient high-order discretization methods 23 //! developed by the ECP co-design Center for Efficient Exascale Discretizations (CEED). 24 //! While our focus is on high-order finite elements, the approach is mostly algebraic 25 //! and thus applicable to other discretizations in factored form. 26 //! 27 //! ## Usage 28 //! 29 //! To use low level libCEED bindings in a Rust package, the following `Cargo.toml` 30 //! can be used. 31 //! ```toml 32 //! [dependencies] 33 //! libceed-sys = { git = "https://github.com/CEED/libCEED", branch = "main" } 34 //! ``` 35 //! 36 //! Supported features: 37 //! * `static` (default): link to static libceed.a 38 //! * `system`: use libceed from a system directory (otherwise, install from source) 39 //! 40 //! ## Development 41 //! 42 //! To develop libCEED, use `cargo build` in the `rust/libceed-sys` directory to 43 //! install a local copy and build the bindings. If you need custom flags for the 44 //! C project, we recommend using `make configure` to cache arguments. If you 45 //! disable the `static` feature, then you'll need to set `LD_LIBRARY_PATH` for 46 //! doctests to be able to find it. You can do this in `$CEED_DIR/lib` and set 47 //! `PKG_CONFIG_PATH`. 48 //! 49 //! Note: the `LD_LIBRARY_PATH` workarounds will become unnecessary if [this 50 //! issue](https://github.com/rust-lang/cargo/issues/1592) is resolved -- it's 51 //! currently closed, but the problem still exists. 52 53 pub mod bind_ceed { 54 #![allow(non_upper_case_globals)] 55 #![allow(non_camel_case_types)] 56 #![allow(dead_code)] 57 include!(concat!(env!("OUT_DIR"), "/bindings.rs")); 58 } 59