Skip to content

Commit c6e78bd

Browse files
committed
Rust API: Add Cargo.toml files for crates.io publishing
1 parent 5a79324 commit c6e78bd

File tree

6 files changed

+122
-13
lines changed

6 files changed

+122
-13
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,4 @@ site/
1818
.venv-docs/
1919

2020
.claude/
21+
lib/rust/target/

lib/rust/Cargo.lock

Lines changed: 56 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/rust/Cargo.toml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[workspace]
2+
members = [
3+
"moteus-derive",
4+
"moteus-protocol",
5+
"moteus",
6+
]
7+
resolver = "2"

lib/rust/moteus-derive/Cargo.toml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
[package]
2+
name = "moteus-derive"
3+
version = "1.0.0"
4+
edition = "2021"
5+
description = "Derive macros for the moteus brushless motor controller client library"
6+
license = "Apache-2.0"
7+
repository = "https://github.com/mjbots/moteus"
8+
keywords = ["moteus", "robotics", "motor-control", "can-fd"]
9+
categories = ["science::robotics", "hardware-support"]
10+
11+
[lib]
12+
proc-macro = true
13+
14+
[dependencies]
15+
proc-macro2 = "1"
16+
quote = "1"
17+
syn = { version = "2", features = ["full"] }
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
[package]
2+
name = "moteus-protocol"
3+
version = "1.0.0"
4+
edition = "2021"
5+
description = "Low-level CAN-FD protocol types for moteus brushless motor controllers (no_std compatible)"
6+
license = "Apache-2.0"
7+
repository = "https://github.com/mjbots/moteus"
8+
keywords = ["moteus", "robotics", "motor-control", "can-fd", "no-std"]
9+
categories = ["science::robotics", "hardware-support", "no-std", "embedded"]
10+
11+
[features]
12+
default = ["std"]
13+
std = []
14+
15+
[dependencies]
16+
moteus-derive = { path = "../moteus-derive", version = "1.0.0" }
17+
num_enum = { version = "0.7", default-features = false }

lib/rust/moteus/Cargo.toml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
[package]
2+
name = "moteus"
3+
version = "1.0.0"
4+
edition = "2021"
5+
description = "Rust client library for moteus brushless motor controllers"
6+
license = "Apache-2.0"
7+
repository = "https://github.com/mjbots/moteus"
8+
keywords = ["moteus", "robotics", "motor-control", "can-fd"]
9+
categories = ["science::robotics", "hardware-support"]
10+
11+
[features]
12+
default = ["serialport"]
13+
clap = ["dep:clap"]
14+
serialport = ["dep:serialport"]
15+
tokio = ["dep:tokio", "dep:tokio-serial"]
16+
17+
[dependencies]
18+
moteus-derive = { path = "../moteus-derive", version = "1.0.0" }
19+
moteus-protocol = { path = "../moteus-protocol", version = "1.0.0" }
20+
21+
clap = { version = "4.5", features = ["derive"], optional = true }
22+
tokio = { version = "1.0", features = ["net", "io-util", "time", "rt", "rt-multi-thread", "macros", "sync"], optional = true }
23+
serialport = { version = "4", optional = true }
24+
tokio-serial = { version = "5.4", optional = true }

0 commit comments

Comments
 (0)