2 unstable releases

0.2.0 Aug 4, 2024
0.1.0 Mar 31, 2023

#220 in Hardware support

Download history 118/week @ 2024-07-31 12/week @ 2024-08-07 11/week @ 2024-09-11 9/week @ 2024-09-18 14/week @ 2024-09-25 15/week @ 2024-10-02 2/week @ 2024-10-09

64 downloads per month

MIT/Apache

570KB
16K SLoC

SCSIR

A simple library for issuing SCSI commands.

Example

fn main() -> scsir::Result<()> {
    // Open a scsi device
    let scsi = scsir::Scsi::new("/dev/sdX")?;

    // Issue a simple command
    scsi.test_unit_ready().issue()?;

    // Issue a command with parameters(fields)
    scsi.read()
        .logical_block_address(0)
        .logical_block_size(512)
        .transfer_length(1)
        .issue_16()?;

    // Issue a command with data out buffer parameters
    scsi.verify()
        .byte_check(0b01)
        .logical_block_address(0)
        .parameter(&[0; 512])
        .issue_16()?;
}

Dependencies

~2–37MB
~575K SLoC