{"id":50844114,"url":"https://github.com/suhteevah/nvme-nostd","last_synced_at":"2026-06-14T08:05:30.692Z","repository":{"id":350422238,"uuid":"1199799439","full_name":"suhteevah/nvme-nostd","owner":"suhteevah","description":"no_std NVMe driver in Rust","archived":false,"fork":false,"pushed_at":"2026-06-07T08:58:03.000Z","size":53,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-06-07T10:24:32.679Z","etag":null,"topics":["bare-metal","driver","embedded","no-std","nvme","operating-system","osdev","rust","storage"],"latest_commit_sha":null,"homepage":null,"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/suhteevah.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-02T18:10:27.000Z","updated_at":"2026-05-30T06:06:58.000Z","dependencies_parsed_at":null,"dependency_job_id":"2c053599-d89a-4d1f-98d7-caa0186bfc7c","html_url":"https://github.com/suhteevah/nvme-nostd","commit_stats":null,"previous_names":["suhteevah/nvme-nostd"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/suhteevah/nvme-nostd","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suhteevah%2Fnvme-nostd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suhteevah%2Fnvme-nostd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suhteevah%2Fnvme-nostd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suhteevah%2Fnvme-nostd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/suhteevah","download_url":"https://codeload.github.com/suhteevah/nvme-nostd/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suhteevah%2Fnvme-nostd/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34313619,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-14T02:00:07.365Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["bare-metal","driver","embedded","no-std","nvme","operating-system","osdev","rust","storage"],"created_at":"2026-06-14T08:05:29.840Z","updated_at":"2026-06-14T08:05:30.685Z","avatar_url":"https://github.com/suhteevah.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nvme-nostd\n\n[![Crates.io](https://img.shields.io/crates/v/nvme-nostd.svg)](https://crates.io/crates/nvme-nostd)\n[![Documentation](https://docs.rs/nvme-nostd/badge.svg)](https://docs.rs/nvme-nostd)\n[![License](https://img.shields.io/crates/l/nvme-nostd.svg)](LICENSE-MIT)\n\nA `#![no_std]` NVMe driver written in pure Rust. Talks directly to NVMe controllers\nvia PCI BAR0 memory-mapped registers using volatile MMIO. No standard library, no OS\ndependencies -- just bring your own allocator and identity-mapped memory.\n\n## Features\n\n- **Full NVMe 1.4 initialization sequence** -- reset, admin queue setup, controller\n  enable, Identify Controller/Namespace, I/O queue creation\n- **Admin commands** -- Identify Controller, Identify Namespace, Create I/O CQ/SQ,\n  Set/Get Features, Set Number of Queues\n- **I/O commands** -- Read, Write, Flush with automatic PRP list construction for\n  multi-page transfers\n- **Block device abstraction** -- `NvmeBlockDevice` provides byte-level `read_bytes` /\n  `write_bytes` with automatic sector alignment and read-modify-write for unaligned\n  access\n- **Comprehensive register definitions** -- all NVMe 1.4 controller registers (CAP,\n  CC, CSTS, AQA, ASQ, ACQ) with volatile access and bitfield constants\n- **Status code constants** -- full set of NVMe generic status codes and status code\n  types for error handling\n- **`#![no_std]` + `alloc`** -- no OS, no standard library. Works in bare-metal\n  kernels, UEFI applications, and embedded systems with a heap allocator\n- **Verbose logging** via the `log` crate -- every register access, command\n  submission, and completion is traced\n\n## Quick Start\n\n```rust,ignore\nuse nvme_nostd::{NvmeController, NvmeBlockDevice};\n\n// BAR0 address from PCI enumeration (must be identity-mapped)\nlet mut ctrl = unsafe {\n    NvmeController::init(bar0_addr).expect(\"NVMe init failed\")\n};\n\n// Get namespace 1\nlet disk = ctrl.namespace(1).expect(\"namespace not found\");\nprintln!(\"Disk: {} sectors x {} bytes\", disk.sector_count, disk.sector_size);\n\n// Sector-level I/O\nlet mut buf = [0u8; 512];\ndisk.read_sectors(0, 1, \u0026mut buf, \u0026mut ctrl).expect(\"read failed\");\n\n// Byte-level block device (handles alignment automatically)\nlet mut blk = NvmeBlockDevice::new(\u0026mut ctrl, 1, disk.sector_count, disk.sector_size);\nlet mut data = [0u8; 100];\nblk.read_bytes(1234, \u0026mut data).expect(\"read failed\");\nblk.write_bytes(1234, \u0026data).expect(\"write failed\");\nblk.flush().expect(\"flush failed\");\n```\n\n## Requirements\n\n- A global allocator (`#[global_allocator]`) -- queue buffers and PRP lists are\n  heap-allocated\n- Identity-mapped memory -- the driver uses heap pointers as physical addresses for\n  DMA. Your page tables must map virtual addresses 1:1 with physical addresses (or\n  you must provide a virt-to-phys translation layer)\n- BAR0 must be mapped as uncacheable MMIO\n\n## Architecture\n\n```text\nNvmeController          -- owns BAR0 registers, admin queue, controller identity\n  +-- NvmeDisk          -- namespace handle (sector count, sector size, LBA formats)\n  +-- NvmeBlockDevice   -- byte-level I/O with automatic sector alignment\n  +-- QueuePair         -- submission + completion queue with doorbell management\n```\n\n### Modules\n\n| Module      | Description |\n|-------------|-------------|\n| `registers` | BAR0 MMIO register definitions, volatile read/write, doorbell calculation |\n| `queue`     | Submission/Completion queue entries, QueuePair with phase-bit tracking |\n| `admin`     | Admin command opcodes, Identify parsing, queue creation, Set/Get Features |\n| `io`        | I/O command opcodes, Read/Write/Flush, PRP list construction |\n| `driver`    | High-level controller init, namespace probing, BlockDevice wrapper |\n\n## License\n\nLicensed under either of\n\n- Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or\n  http://www.apache.org/licenses/LICENSE-2.0)\n- MIT License ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)\n\nat your option.\n\n## Contributing\n\nContributions are welcome! Please open an issue or pull request on\n[GitHub](https://github.com/suhteevah/nvme-nostd).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuhteevah%2Fnvme-nostd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsuhteevah%2Fnvme-nostd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuhteevah%2Fnvme-nostd/lists"}