Skip to main content

tipc_std/
lib.rs

1// SPDX-License-Identifier: Apache-2.0
2// Copyright 2026 KylinSoft Co., Ltd. <https://www.kylinos.cn/>
3// See LICENSES for license details.
4
5//! TIPC standard library type provider.
6//!
7//! Provides the same API surface as `trusty_std` (TryClone, FallibleCString,
8//! Mutex, etc.) in a `no_std` environment backed by `core` + `alloc`.
9//! Both `lk` and `x-kernel` targets are `no_std`; the feature only selects
10//! syscall numbering.
11
12#![no_std]
13#![allow(internal_features)]
14#![allow(clippy::legacy_numeric_constants)]
15#![feature(allocator_api)]
16#![feature(core_intrinsics)]
17
18extern crate alloc as alloc_crate;
19
20pub mod alloc;
21mod clone_ext;
22pub mod ffi;
23pub mod sync;
24
25pub use core::{
26    any, arch, array, assert, assert_eq, assert_ne, cell, cfg, char, clone, cmp, column,
27    compile_error, concat, convert, debug_assert, debug_assert_eq, debug_assert_ne, default, env,
28    file, format_args, future, hash, hint, i8, i16, i32, i64, i128, include, include_bytes,
29    include_str, intrinsics, isize, iter, line, marker, matches, mem, module_path, ops, option,
30    option_env, pin, primitive, ptr, result, stringify, u8, u16, u32, u64, u128, unimplemented,
31    unreachable, usize, write, writeln,
32};
33
34// Re-export commonly used types for source-level compatibility
35// with code originally written for `trusty_std`.
36pub use alloc_crate::{borrow, boxed, fmt, format, rc, slice, str, string, vec};
37pub use clone_ext::TryClone;