Skip to content

Commit 20f23d8

Browse files
author
Pascal Hertleif
committed
Move CLI into own crate
1 parent 272377b commit 20f23d8

File tree

4 files changed

+32
-3
lines changed

4 files changed

+32
-3
lines changed

Cargo.lock

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

Cargo.toml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,25 @@
11
[package]
22
name = "dbc-codegen"
33
version = "0.1.0"
4-
authors = ["Pascal Hertleif <[email protected]>"]
4+
authors = [
5+
"Pascal Hertleif <[email protected]>",
6+
"Marcel Buesing <[email protected]>",
7+
"Andres Vahter <[email protected]>",
8+
]
59
edition = "2018"
610
description = "CAN DBC code-gen for embedded Rust"
711
license = "MIT OR Apache-2.0"
812
readme = "README.md"
913

1014
[dependencies]
11-
anyhow = "1.0.33"
1215
can-dbc = "3.0.2"
16+
anyhow = "1.0.33"
1317
heck = "0.3.1"
14-
structopt = "0.3.20"
1518

1619
[workspace]
1720
members = [
1821
".",
22+
"dbc-codegen-cli",
1923
"testing/rust-integration",
2024
"testing/can-messages",
2125
"testing/cantools-messages",

dbc-codegen-cli/Cargo.toml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
[package]
2+
name = "dbc-codegen-cli"
3+
version = "0.1.0"
4+
authors = ["Pascal Hertleif <[email protected]>"]
5+
edition = "2018"
6+
7+
[dependencies]
8+
anyhow = "1.0.33"
9+
heck = "0.3.1"
10+
structopt = "0.3.20"
11+
dbc-codegen = { path = ".." }
12+
13+
[[bin]]
14+
name = "dbc-codegen"
15+
path = "src/main.rs"

src/main.rs renamed to dbc-codegen-cli/src/main.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ use anyhow::Result;
22
use std::path::PathBuf;
33
use structopt::StructOpt;
44

5+
/// Generate Rust structs from a `dbc` file.
56
#[derive(Debug, StructOpt)]
67
struct Cli {
78
/// Path to a `.dbc` file

0 commit comments

Comments
 (0)