{"id":17321164,"url":"https://github.com/lambda-fairy/rust-errno","last_synced_at":"2025-05-15T02:06:46.510Z","repository":{"id":28918582,"uuid":"32443636","full_name":"lambda-fairy/rust-errno","owner":"lambda-fairy","description":":boom: Cross-platform interface to the `errno` variable","archived":false,"fork":false,"pushed_at":"2025-05-10T11:39:16.000Z","size":131,"stargazers_count":69,"open_issues_count":3,"forks_count":43,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-05-15T00:14:05.907Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://docs.rs/errno","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lambda-fairy.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2015-03-18T07:12:51.000Z","updated_at":"2025-05-10T11:39:20.000Z","dependencies_parsed_at":"2023-01-16T22:30:32.582Z","dependency_job_id":"6a5dcab8-573c-469f-aa9c-43a0cd7bd889","html_url":"https://github.com/lambda-fairy/rust-errno","commit_stats":{"total_commits":153,"total_committers":30,"mean_commits":5.1,"dds":"0.46405228758169936","last_synced_commit":"7450e3d57f2731d9fc3a495fe653dd19938dfb55"},"previous_names":[],"tags_count":30,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lambda-fairy%2Frust-errno","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lambda-fairy%2Frust-errno/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lambda-fairy%2Frust-errno/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lambda-fairy%2Frust-errno/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lambda-fairy","download_url":"https://codeload.github.com/lambda-fairy/rust-errno/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254249206,"owners_count":22039029,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-15T13:35:34.314Z","updated_at":"2025-05-15T02:06:46.492Z","avatar_url":"https://github.com/lambda-fairy.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# errno [![CI](https://github.com/lambda-fairy/rust-errno/actions/workflows/main.yml/badge.svg)](https://github.com/lambda-fairy/rust-errno/actions/workflows/main.yml) [![Cargo](https://img.shields.io/crates/v/errno.svg)](https://crates.io/crates/errno)\n\nCross-platform interface to the [`errno`][errno] variable. Works on Rust 1.56 or newer.\n\nDocumentation is available at \u003chttps://docs.rs/errno\u003e.\n\n[errno]: https://en.wikipedia.org/wiki/Errno.h\n\n\n## Dependency\n\nAdd to your `Cargo.toml`:\n\n```toml\n[dependencies]\nerrno = \"*\"\n```\n\n\n## Comparison with `std::io::Error`\n\nThe standard library provides [`Error::last_os_error`][last_os_error] which fetches `errno` in the same way.\n\nThis crate provides these extra features:\n\n- No heap allocations\n- Optional `#![no_std]` support\n- A `set_errno` function\n\n[last_os_error]: https://doc.rust-lang.org/std/io/struct.Error.html#method.last_os_error\n\n\n## Examples\n\n```rust\nextern crate errno;\nuse errno::{Errno, errno, set_errno};\n\n// Get the current value of errno\nlet e = errno();\n\n// Set the current value of errno\nset_errno(e);\n\n// Extract the error code as an i32\nlet code = e.0;\n\n// Display a human-friendly error message\nprintln!(\"Error {}: {}\", code, e);\n```\n\n\n## `#![no_std]`\n\nEnable `#![no_std]` support by disabling the default `std` feature:\n\n```toml\n[dependencies]\nerrno = { version = \"*\", default-features = false }\n```\n\nThe `Error` impl will be unavailable.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flambda-fairy%2Frust-errno","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flambda-fairy%2Frust-errno","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flambda-fairy%2Frust-errno/lists"}