#Linux #storage #SCSI


A library for getting information from Linux SCSI Generic (sg3)

6 releases

✓ Uses Rust 2018 edition

0.1.5 Dec 1, 2019
0.1.4 Nov 2, 2017
0.1.3 Jun 13, 2017
0.1.2 May 30, 2017

#135 in Unix APIs

43 downloads per month

MIT license

476 lines


Rust library to get info from Linux SCSI Generic (sg3)


just started, only does standard inquiry so far.


If it complains about missing stddef.h, install clang.


SCSI Commands using the Linux SCSI Generic (sg3) driver


The Linux sg driver interface allows userspace to craft and send SCSI commands to SCSI devices present on the system.

More information can be found here.

Currently, this library does not expose the full capabilities of the interface, but just handles a few commands that were immediately of interest to the author -- calling and parsing various types of INQUIRY. If other capabilities are desired, it should be possible to add support beyond this with relative ease.


~62K SLoC