Skip to main content

hyperlight_libc/
lib.rs

1// SPDX-License-Identifier: Apache-2.0
2// Copyright 2025 The Hyperlight Authors.
3
4//! Hyperlight libc crate
5//!
6//! This crate provides the picolibc library for Hyperlight guests.
7//! It builds picolibc from source and generates Rust bindings to the
8//! C library types and functions.
9
10#![no_std]
11#![allow(clippy::approx_constant)]
12#![allow(clippy::missing_safety_doc)]
13#![allow(clippy::unnecessary_cast)]
14#![allow(clippy::useless_transmute)]
15#![allow(dead_code)]
16#![allow(improper_ctypes)]
17#![allow(non_camel_case_types)]
18#![allow(non_snake_case)]
19#![allow(non_upper_case_globals)]
20#![allow(unpredictable_function_pointer_comparisons)]
21
22// Include the generated bindings
23include!(concat!(env!("OUT_DIR"), "/bindings.rs"));
24
25pub use core::ffi::*;
26
27mod stubs;