classicube_sys/
std_types.rs

1#[cfg(not(feature = "no_std"))]
2mod inner {
3    pub use std::{
4        boxed::Box,
5        ffi::CString,
6        os::raw::*,
7        string::{String, ToString},
8        vec,
9        vec::Vec,
10    };
11
12    pub fn cosf(a: f32) -> f32 {
13        a.cos()
14    }
15    pub fn sinf(a: f32) -> f32 {
16        a.sin()
17    }
18    pub fn floorf(a: f32) -> f32 {
19        a.floor()
20    }
21    pub fn sqrtf(a: f32) -> f32 {
22        a.sqrt()
23    }
24}
25
26#[cfg(feature = "no_std")]
27mod inner {
28    pub use alloc::{
29        boxed::Box,
30        string::{String, ToString},
31        vec,
32        vec::Vec,
33    };
34
35    pub use cstr_core::CString;
36    pub use libc::*;
37    pub use libm::*;
38}
39
40pub use inner::*;