Skip to content

Commit

Permalink
Prep for release
Browse files Browse the repository at this point in the history
  • Loading branch information
refi64 committed Dec 19, 2024
1 parent 8e06f22 commit 858eee5
Show file tree
Hide file tree
Showing 11 changed files with 56 additions and 9 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,13 @@ resolver = "2"

[workspace.package]
version = "0.1.0"
authors = ["Ryan Gonzalez <[email protected]>"]
categories = ["hardware-support", "os", "os::linux-apis"]
keywords = ["linux", "sysfs", "usb"]
edition = "2021"
license = "MIT OR Apache-2.0"
readme = "README.md"
repository = "https://github.com/collabora/yuca"
publish = true

[workspace.dependencies]
rustix = { version = "0.38.37", features = ["fs"] }
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# yuca

[![crates.io](https://img.shields.io/crates/v/yuca?style=for-the-badge)](https://crates.io/crates/yuca)
[![docs.rs](https://img.shields.io/docsrs/yuca?style=for-the-badge)](https://docs.rs/yuca)
[![build status](https://img.shields.io/github/actions/workflow/status/collabora/yuca/ci.yml?style=for-the-badge)](https://github.com/collabora/yuca/actions/workflows/ci.yml)

Yuca is a Rust crate to access USB Type-C device information on Linux.

```rust,no_run
Expand Down
13 changes: 11 additions & 2 deletions yuca-cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
[package]
name = "yuca-cli"
edition = "2021"
description = "Demo CLI for yuca (access USB Type-C device information on Linux)"
readme = "README.md"
version.workspace = true
authors.workspace = true
categories.workspace = true
keywords.workspace = true
edition.workspace = true
license.workspace = true
repository.workspace = true
publish.workspace = true

[[bin]]
name = "yuca"
Expand All @@ -13,4 +22,4 @@ futures-lite = "2.5.0"
owo-colors = { version = "4.1.0", features = ["supports-colors"] }
tokio = { workspace = true, features = ["sync"] }
usb-ids = "1.2024.5"
yuca = { path = "../yuca" }
yuca = { version = "0.1.0", path = "../yuca" }
14 changes: 14 additions & 0 deletions yuca-cli/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# yuca-cli

A demo CLI for [yuca](https://crates.io/crates/bilge).

```
Usage: yuca COMMAND ...
Available options:
-h, --help Prints help information
Available commands:
tree Print a tree of all available Type-C devices.
watch Watch for added, removed, and changed devices.
```
11 changes: 10 additions & 1 deletion yuca/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
[package]
name = "yuca"
edition = "2021"
description = "Access USB Type-C device information on Linux"
readme = "README.md"
version.workspace = true
authors.workspace = true
categories.workspace = true
keywords.workspace = true
edition.workspace = true
license.workspace = true
repository.workspace = true
publish.workspace = true

[features]
default = ["tokio"]
Expand Down
1 change: 1 addition & 0 deletions yuca/README.md
6 changes: 6 additions & 0 deletions docs/overview.md → yuca/docs/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,12 @@ println!("Port 0's power role is: {power_role:?}");
# }
```

Many of the properties directly correspond to the sysfs paths, so you can use
the kernel's documentation on them as a point of reference:

- https://www.kernel.org/doc/Documentation/ABI/testing/sysfs-class-typec
- https://www.kernel.org/doc/Documentation/ABI/testing/sysfs-class-usb_power_delivery

[`Device`]: trait@sysfs::Device
[`Device::open`]: fn@sysfs::Device::open
[`DeviceEntry`]: struct@sysfs::DeviceEntry
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions yuca/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#![cfg_attr(docsrs, feature(doc_cfg))]
#![doc = include_str!("../../README.md")]
#![doc = include_str!("../../docs/overview.md")]
#![doc = include_str!("../README.md")]
#![doc = include_str!("../docs/overview.md")]

pub mod sysfs;
pub mod types;
Expand Down
2 changes: 1 addition & 1 deletion yuca/src/watcher.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![doc = include_str!("../../docs/watcher.md")]
#![doc = include_str!("../docs/watcher.md")]

use std::{
collections::HashMap,
Expand Down

0 comments on commit 858eee5

Please sign in to comment.