Safe wrapper and Rust port of GNU libcdio.
For raw bindings, check out libcdio-sys.
- Install clang.
- Add with cargo:
cargo add libcdio-rs --all-features
Feature flags are provided and guard the modules named after them. See the documentation.
Currently, this library is partly a safe wrapper over libcdio and partly a port, with the goal of an eventual transition to a full rewrite.
Progress so far:
- Ported SCSI MMC functionality.
- Implemented safe wrappers for a subset of ISO 9660 and UDF routines.
This library implements SCSI routines primarily based on MMC-6 rev.2g and SPC-3 rev.23.
These are set to perform lint and formatting checks before every commit:
git config core.hooksPath .githooksIf you have to skip hooks for a draft commit, use --no-verify:
git commit --no-verifyThe MMC tests are ignored by default as they require a CD/DVD drive.
cargo test --all-features -- --include-ignoredA few of the tests require manual intervention (such as media
removal) and require you to set MANUAL_TESTS.
These are located in tests/.
Example, to run the media removal test:
MANUAL_TESTS=1 cargo test --all-features -- media_removal --include-ignoredlibcdio-cli provides utility programs based on this crate's functionality.
Copyright (C) 2026 Shiva Kiran Koninty shiva@skran.xyz
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.