forked from kevinmehall/nusb
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request kevinmehall#5 from cr8t/readme
README: add a project README.md
- Loading branch information
Showing
1 changed file
with
45 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# udev | ||
|
||
Rust port of the [`eudev`](https://github.com/eudev-project/eudev) project for interacting with the Linux `devfs` filesystem. | ||
|
||
The project attempts to maintain a public API as close to possible with the original C project. | ||
|
||
This library is an init-system independent implementation, just like `eudev`. | ||
|
||
## Safety | ||
|
||
As much as possible, code is written in safe Rust. Some points of interaction with the Linux API require `unsafe` code. | ||
|
||
All `unsafe` code is wrapped in safe interfaces, and documented with `SAFETY` comments. | ||
|
||
There are no C dependencies. | ||
|
||
## Rust API | ||
|
||
All Rust structs have a public API that is somewhat close to counterparts in the `eudev` library. | ||
|
||
See library documentation for usage. | ||
|
||
To generate documentation locally: | ||
|
||
```bash | ||
$ cd udev | ||
$ cargo doc --all --open | ||
``` | ||
|
||
As the project matures, use-case examples will be added to doc-tests. | ||
|
||
## WIP | ||
|
||
Currently, there is only a Rust public API. Work is still ongoing to expose remaining subsystems via the top-level API: | ||
|
||
- [x] [Udev] context | ||
- [x] [UdevList] device entry lists | ||
- [x] [UdevDevice] kernel devices | ||
- [ ] [UdevMonitor] device monitor service | ||
- [ ] [UdevEnumerate] device enumeration | ||
- [ ] [UdevQueue] device queue | ||
- [ ] [UdevHwdb] device hardware database persistent storage | ||
- [ ] public C API via FFI | ||
- after the Rust API stabilizes, work can start on a C API | ||
- some abstractions will take some work to expose safely through the FFI barrier, e.g. `Arc<Udev>` |