kronos_compute/
lib.rs

1//! Kronos - A compute-only Vulkan implementation in Rust
2//! 
3//! This crate provides a streamlined, compute-focused subset of the Vulkan API,
4//! removing all graphics functionality to achieve maximum GPU compute performance.
5
6#![allow(non_camel_case_types)]
7#![allow(non_snake_case)]
8
9pub mod core;
10pub mod sys;
11pub mod ffi;
12
13#[cfg(feature = "implementation")]
14pub mod implementation;
15
16// Re-export commonly used items
17pub use core::*;
18pub use sys::*;
19pub use ffi::*;
20
21#[cfg(feature = "implementation")]
22pub use implementation::{initialize_kronos};
23
24#[cfg(feature = "implementation")]
25pub use implementation::*;
26
27// For libc types
28extern crate libc;
29
30/// Version information
31pub const KRONOS_VERSION_MAJOR: u32 = 0;
32pub const KRONOS_VERSION_MINOR: u32 = 1;
33pub const KRONOS_VERSION_PATCH: u32 = 0;
34
35/// Make version number from major, minor, and patch numbers
36#[inline]
37pub const fn make_version(major: u32, minor: u32, patch: u32) -> u32 {
38    (major << 22) | (minor << 12) | patch
39}
40
41/// Kronos API version
42pub const KRONOS_API_VERSION: u32 = make_version(
43    KRONOS_VERSION_MAJOR,
44    KRONOS_VERSION_MINOR,
45    KRONOS_VERSION_PATCH
46);
47
48#[cfg(test)]
49mod tests {
50    use super::*;
51
52    #[test]
53    fn test_version() {
54        assert_eq!(KRONOS_API_VERSION, make_version(0, 1, 0));
55    }
56}