Files
SUB-OS/include/kernel/rust.h
T
subhobhai943 24deed8ead feat(rust): Implement Rust-for-SUB-OS kernel layer, ChaCha20 crypto, HWMON thermal governor, and lazybox applets
- Add freestanding no_std Rust kernel layer compiled with rustc
- Implement memory-safe ChaCha20 RFC-8439 stream cipher and CSPRNG in Rust
- Implement intelligent thermal fan speed governor in Rust
- Add printk macro bridge (kprint!, kprintln!) for Rust
- Register 'rustinfo' and 'chacha20' LazyBox applets
- Enable x86_64 hardware FPU & SSE (CR4.OSFXSR/OSXMMEXCPT)
- Add cross-architecture C-bridge for ARM targets
- Update stage2.asm kernel sector copy bounds to 448 KB
2026-08-18 12:44:25 +05:30

21 lines
588 B
C

#ifndef _KERNEL_RUST_H
#define _KERNEL_RUST_H
#include <stdint.h>
#include <stddef.h>
#include <stdbool.h>
typedef struct {
uint32_t target_fan_rpm;
uint8_t throttle_level;
bool is_critical;
} __attribute__((packed)) rust_thermal_report_t;
int rust_kernel_init(void);
const char* rust_kernel_status(void);
int rust_chacha20_crypt(const uint8_t* key, const uint8_t* nonce, uint32_t counter, uint8_t* data, size_t len);
int rust_csprng_get_random(uint8_t* buffer, size_t len);
rust_thermal_report_t rust_sensor_calc_fan_curve(int32_t temp_celsius);
#endif // _KERNEL_RUST_H