oscall 0.0.0

Low-level cross-platform interface to operating system services: files, memory mapping, networking and more, with no libc on Linux
Documentation
//! Low-level cross-platform interface to operating system services.
//!
//! `oscall` talks to the operating system directly, with no dependencies:
//!
//! - **Linux** (and [fullrust]): raw system calls, no libc involved.
//! - **macOS**: `libSystem`, the only stable interface to the kernel.
//! - **Windows**: `kernel32`, `ntdll` and `ws2_32`.
//!
//! The crate is a scaffold for now: no OS interface is exposed yet. See
//! `docs/plan.md` in the repository for the design and the roadmap.
//!
//! [fullrust]: https://github.com/KarpelesLab/fullrust
#![no_std]

#[cfg(feature = "alloc")]
extern crate alloc;
#[cfg(feature = "std")]
extern crate std;

mod sys;

#[cfg(test)]
mod tests {
    use super::sys;

    /// Each target selects the backend its operating system needs.
    #[test]
    fn backend() {
        let expected = if cfg!(any(target_os = "linux", target_os = "fullrust")) {
            "linux"
        } else if cfg!(target_os = "macos") {
            "apple"
        } else {
            "windows"
        };
        assert_eq!(sys::NAME, expected);
    }
}