reverie_syscalls/lib.rs
1/*
2 * Copyright (c) Meta Platforms, Inc. and affiliates.
3 * All rights reserved.
4 *
5 * This source code is licensed under the BSD-style license found in the
6 * LICENSE file in the root directory of this source tree.
7 */
8
9//! This crate wraps raw `u64` syscall arguments in stronger Rust types. This
10//! has a number of useful side effects:
11//! 1. Syscalls and their arguments can be easily displayed for debugging
12//! purposes.
13//! 2. When intercepting syscalls, the Rust type can be accessed more safely.
14//! 3. When injecting syscalls, it is easier and clearer to set the arguments
15//! using the `with_*` builder methods.
16
17#![deny(missing_docs)]
18#![deny(rustdoc::broken_intra_doc_links)]
19#![cfg(target_os = "linux")]
20
21#[macro_use]
22mod macros;
23
24mod args;
25mod display;
26pub mod linux_abi;
27mod raw;
28#[cfg(any(target_arch = "x86_64", target_arch = "aarch64"))]
29pub mod reserved_fds;
30mod syscalls;
31
32// Re-export the only things that might be needed from the syscalls crate
33pub use ::reverie_memory::*;
34pub use ::syscalls::Errno;
35pub use ::syscalls::SyscallArgs;
36pub use ::syscalls::Sysno;
37
38pub use crate::args::*;
39pub use crate::display::*;
40pub use crate::raw::*;
41pub use crate::syscalls::*;