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// Unified safe API
14pub mod api;
15
16#[cfg(feature = "implementation")]
17pub mod implementation;
18
19// Re-export commonly used items
20pub use core::*;
21pub use sys::*;
22pub use ffi::*;
23
24#[cfg(feature = "implementation")]
25pub use implementation::{initialize_kronos};
26
27#[cfg(feature = "implementation")]
28pub use implementation::*;
29
30// For libc types
31extern crate libc;
32
33/// Version information
34pub const KRONOS_VERSION_MAJOR: u32 = 0;
35pub const KRONOS_VERSION_MINOR: u32 = 1;
36pub const KRONOS_VERSION_PATCH: u32 = 0;
37
38/// Make version number from major, minor, and patch numbers
39#[inline]
40pub const fn make_version(major: u32, minor: u32, patch: u32) -> u32 {
41    (major << 22) | (minor << 12) | patch
42}
43
44/// Kronos API version
45pub const KRONOS_API_VERSION: u32 = make_version(
46    KRONOS_VERSION_MAJOR,
47    KRONOS_VERSION_MINOR,
48    KRONOS_VERSION_PATCH
49);
50
51#[cfg(test)]
52mod tests {
53    use super::*;
54
55    #[test]
56    fn test_version() {
57        assert_eq!(KRONOS_API_VERSION, make_version(0, 1, 0));
58    }
59}