#errno #no-std #unix #windows #linux

no-std errno-no-std

Cross-platform interface to the errno variable

10 releases

Uses new Rust 2021

0.1.5 Jun 27, 2022
0.1.4 Jun 22, 2022
0.1.0 May 24, 2022
0.0.4 May 9, 2022
0.0.1 Oct 2, 2021

#99 in Operating systems

Download history 3/week @ 2022-03-15 3/week @ 2022-03-22 2/week @ 2022-04-05 1/week @ 2022-04-12 8/week @ 2022-04-19 60/week @ 2022-04-26 31/week @ 2022-05-03 81/week @ 2022-05-10 47/week @ 2022-05-17 92/week @ 2022-05-24 119/week @ 2022-05-31 236/week @ 2022-06-07 45/week @ 2022-06-14 264/week @ 2022-06-21 132/week @ 2022-06-28

709 downloads per month
Used in 7 crates (6 directly)

MIT/Apache

15KB
361 lines

maintenance: actively developed

errno-no-std

Cross-platform interface to the errno variable.

An improved version of the errno crate.

Examples

use errno::{Errno, errno, set_errno};

// Get the current value of errno
let e = errno();

// Set the current value of errno
set_errno(e);

// Extract the error code as an i32
let code = e.0;

// Display a human-friendly error message
println!("Error {}: {}", code, e);

lib.rs:

Crate features

  • "std" Enabled by default. Disable to make the library #![no_std].

Dependencies

~165KB