From febb2deae3e4bf1626e6fc563894447af51434af Mon Sep 17 00:00:00 2001 From: Soispha Date: Wed, 27 Mar 2024 22:13:05 +0100 Subject: [PATCH] fix(types/types_list): Add the supported primitive types Otherwise, the generated type paths lead nowhere. --- src/types/mod.rs | 1 + src/types/types_list.rs | 14 ++++++++++++++ 2 files changed, 15 insertions(+) diff --git a/src/types/mod.rs b/src/types/mod.rs index 6785f8f..04b15e0 100644 --- a/src/types/mod.rs +++ b/src/types/mod.rs @@ -38,6 +38,7 @@ macro_rules! header { /// // NOTE: Every type here must have the [`Convertible`] implemented on it (@soispha) // And be added to the `convert/c/auxiliary/idendentifier/mod.rs` file +// And add it to the types list (`./types_list.rs`) pub const BASE_TYPES: [(&'static std::primitive::str, usize); 11] = [ // Unsigned ("u8", 0), diff --git a/src/types/types_list.rs b/src/types/types_list.rs index 8f5b5c8..e7aa3b7 100644 --- a/src/types/types_list.rs +++ b/src/types/types_list.rs @@ -40,3 +40,17 @@ pub struct Vec { pub(crate) length: usize, pub(crate) capacity: usize, } + +// Unsigned +pub use std::primitive::u16; +pub use std::primitive::u32; +pub use std::primitive::u64; +pub use std::primitive::u8; +// Signed +pub use std::primitive::i16; +pub use std::primitive::i32; +pub use std::primitive::i64; +pub use std::primitive::i8; +// Float +pub use std::primitive::f32; +pub use std::primitive::f64;