spice/
lib.rs

1#![doc(
2    html_logo_url = "https://raw.githubusercontent.com/GregoireHENRY/rust-spice/main/rust-spice/rsc/img/logo_squared.png",
3    html_favicon_url = "https://raw.githubusercontent.com/GregoireHENRY/rust-spice/main/rust-spice/rsc/img/logo_squared.png"
4)]
5// Doc tests in the README fail with 'lock' enabled
6#![cfg_attr(not(feature = "lock"), doc = include_str!("../README.md"))]
7#![cfg_attr(docsrs, feature(doc_cfg))]
8
9#[cfg(feature = "default")]
10extern crate cspice_sys;
11
12#[cfg(feature = "noclang")]
13extern crate cspice_sys_no_clang as cspice_sys;
14
15extern crate itertools;
16extern crate libc;
17extern crate nalgebra as na;
18extern crate serial_test;
19extern crate spice_derive;
20
21/// The string version of **kalast**.
22pub const VERSION: &str = env!("CARGO_PKG_VERSION");
23
24pub mod c {
25    /*!
26    Complete NASA/NAIF C SPICE binded functions, very unsafe.
27    */
28    pub use cspice_sys::*;
29}
30
31// The unguarded API should only be exposed if the lock is disabled
32#[cfg(not(feature = "lock"))]
33pub mod core;
34#[cfg(not(feature = "lock"))]
35pub use crate::core::*;
36// If it is enabled, only this crate should see it
37#[cfg(feature = "lock")]
38pub(crate) mod core;
39#[cfg(feature = "lock")]
40pub(crate) use crate::core::*;
41
42// These items need to be exposed regardless of whether 'lock' is enabled or not
43pub use crate::core::{DLADSC, DSKDSC, MAX_LEN_OUT, TIME_FORMAT, TIME_FORMAT_SIZE};
44
45#[cfg(any(feature = "lock", doc))]
46#[cfg_attr(docsrs, doc(cfg(feature = "lock")))]
47pub use crate::core::lock::SpiceLock;