summaryrefslogtreecommitdiff
path: root/bindgen
diff options
context:
space:
mode:
authoromniscient <17525998+omnisci3nce@users.noreply.github.com>2024-10-05 17:44:50 +1000
committeromniscient <17525998+omnisci3nce@users.noreply.github.com>2024-10-05 17:44:50 +1000
commit8ce117f0b3fd4ceeb1d7058dde8793e4421ec076 (patch)
treeafb228582dbceb6d9271b0dbd365223119f59d35 /bindgen
parent2c1a7d7f293c26d631e15cf4cbec542ac50994aa (diff)
trying to get rust bindgen working
Diffstat (limited to 'bindgen')
-rw-r--r--bindgen/rust/celeritas-sys/build.rs7
-rw-r--r--bindgen/rust/src/lib.rs8
-rw-r--r--bindgen/rust/src/prelude.rs24
3 files changed, 20 insertions, 19 deletions
diff --git a/bindgen/rust/celeritas-sys/build.rs b/bindgen/rust/celeritas-sys/build.rs
index 24b1d85..e8c54bd 100644
--- a/bindgen/rust/celeritas-sys/build.rs
+++ b/bindgen/rust/celeritas-sys/build.rs
@@ -46,15 +46,14 @@ fn main() {
// TODO: we need to look based on OS
// Tell cargo to look for shared libraries in the specified directory
- let static_lib_path = "/home/joshua/repos/cel-core3/build".to_string();
+ let static_lib_path = "/Users/josh/code/CodenameVentus/deps/cel-core/build".to_string();
// let static_lib_path = std::env::var("CELERITAS_CORE_LIB")
// .unwrap_or("../../../build/macosx/arm64/debug".to_string());
println!("cargo:rustc-link-search={static_lib_path}");
- // Tell cargo to tell rustc to link the system bzip2
- // shared library.
- println!("cargo:rustc-link-lib=dylib=celeritas");
+ // Tell cargo to tell rustc to link the necc. libraries
+ println!("cargo:rustc-link-lib=celeritas");
println!("cargo:rustc-link-lib=glfw");
// The bindgen::Builder is the main entry point
diff --git a/bindgen/rust/src/lib.rs b/bindgen/rust/src/lib.rs
index 66c99a2..ce3326c 100644
--- a/bindgen/rust/src/lib.rs
+++ b/bindgen/rust/src/lib.rs
@@ -4,14 +4,14 @@
#![cfg_attr(docsrs, feature(doc_cfg))]
pub use celeritas_sys as ffi;
-use glam::Vec3;
+// use glam::Vec3;
/// Commonly used types
pub mod prelude;
-pub mod ral;
-pub mod resources;
-pub mod shader;
+// pub mod ral;
+// pub mod resources;
+// pub mod shader;
// use std::{
// ffi::CString,
diff --git a/bindgen/rust/src/prelude.rs b/bindgen/rust/src/prelude.rs
index 74cc400..90a5df5 100644
--- a/bindgen/rust/src/prelude.rs
+++ b/bindgen/rust/src/prelude.rs
@@ -1,18 +1,20 @@
-// /// --- maths types
-// pub use celeritas_sys::Mat4;
-// pub use celeritas_sys::Vec2;
-// pub use celeritas_sys::Vec3;
-// pub use celeritas_sys::Vec4;
+/// --- maths types
+pub use celeritas_sys::Vec2;
+pub use celeritas_sys::Vec3;
+pub use celeritas_sys::Vec4;
+pub use celeritas_sys::Quat;
+pub use celeritas_sys::Mat4;
+pub use celeritas_sys::Transform;
// // --- handles
-// pub use celeritas_sys::BufferHandle;
-// pub use celeritas_sys::MaterialHandle;
-// pub use celeritas_sys::MeshHandle;
-// pub use celeritas_sys::ModelHandle;
-// pub use celeritas_sys::PipelineHandle;
+pub use celeritas_sys::BufHandle;
+pub use celeritas_sys::TexHandle;
+pub use celeritas_sys::MaterialHandle;
+pub use celeritas_sys::MeshHandle;
+pub use celeritas_sys::ModelHandle;
+pub use celeritas_sys::PipelineHandle;
// pub use celeritas_sys::PipelineLayoutHandle;
// pub use celeritas_sys::RenderpassHandle;
-// pub use celeritas_sys::TextureHandle;
// // --- conversions
// pub use celeritas_sys::conversions;