Skip to main content

hyperlight_libc/
lib.rs

1/*
2Copyright 2025  The Hyperlight Authors.
3
4Licensed under the Apache License, Version 2.0 (the "License");
5you may not use this file except in compliance with the License.
6You may obtain a copy of the License at
7
8    http://www.apache.org/licenses/LICENSE-2.0
9
10Unless required by applicable law or agreed to in writing, software
11distributed under the License is distributed on an "AS IS" BASIS,
12WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13See the License for the specific language governing permissions and
14limitations under the License.
15*/
16
17//! Hyperlight libc crate
18//!
19//! This crate provides the picolibc library for Hyperlight guests.
20//! It builds picolibc from source and generates Rust bindings to the
21//! C library types and functions.
22
23#![no_std]
24#![allow(clippy::approx_constant)]
25#![allow(clippy::missing_safety_doc)]
26#![allow(clippy::unnecessary_cast)]
27#![allow(clippy::useless_transmute)]
28#![allow(dead_code)]
29#![allow(improper_ctypes)]
30#![allow(non_camel_case_types)]
31#![allow(non_snake_case)]
32#![allow(non_upper_case_globals)]
33#![allow(unpredictable_function_pointer_comparisons)]
34
35// Include the generated bindings
36include!(concat!(env!("OUT_DIR"), "/bindings.rs"));
37
38pub use core::ffi::*;
39
40mod stubs;