Skip to content

Commit

Permalink
when you get carried away and reorganize the whole repo for no reason
Browse files Browse the repository at this point in the history
  • Loading branch information
jr1221 committed Dec 30, 2024
1 parent a19f7f3 commit d6ea3af
Show file tree
Hide file tree
Showing 21 changed files with 43 additions and 37 deletions.
2 changes: 2 additions & 0 deletions Cargo.lock

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

32 changes: 4 additions & 28 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
[package]
name = "calypso"
version = "0.1.0"
edition = "2021"
rust-version = "1.79"
default-run = "calypso"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[workspace]
members = ["libs/daedalus", "libs/calypso-cangen", "calypso-simulate"]
members = ["daedalus", "calypso-cangen", "calypso-simulate", "calypso"]
default-members = ["calypso"]
resolver = "2"

[workspace.dependencies]
proc-macro2 = "1.0.92"
Expand All @@ -20,24 +13,7 @@ clap = { version = "4.5.23", features = ["derive", "env"] }
protobuf-codegen = "3.5.1"
protobuf = "3.5.1"


[dependencies]
socketcan = "3.3.1"
paho-mqtt.workspace = true
protobuf-codegen.workspace = true
protobuf.workspace = true
bitstream-io = "2.6.0"
clap.workspace = true
phf = { version = "0.11.2", features = ["macros"] }
calypso-cangen = { path = "./libs/calypso-cangen" }
daedalus = { path = "./libs/daedalus" }


[build-dependencies]
protobuf-codegen = "3.5.1"
calypso-cangen = { path = "./libs/calypso-cangen" }

[profile.release]
lto = true
codegen-units = 1
panic = "abort"
panic = "abort"
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ pub mod validate;
* Used by all daedalus macros
* Filepath is relative to project root (i.e. /Calypso)
*/
pub const CANGEN_SPEC_PATH: &str = "./Embedded-Base/cangen/can-messages";
pub const CANGEN_SPEC_PATH: &str = "../Embedded-Base/cangen/can-messages";
File renamed without changes.
10 changes: 7 additions & 3 deletions calypso-simulate/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ edition = "2021"
[dependencies]
clap.workspace = true
rand = "0.8"
calypso = { path = "../" }
daedalus = { path = "../libs/daedalus" }
protobuf.workspace = true
calypso = { path = "../calypso" }
daedalus = { path = "../daedalus" }
protobuf.workspace = true

[build-dependencies]
protobuf-codegen.workspace = true
calypso-cangen = { path = "../calypso-cangen" }
24 changes: 24 additions & 0 deletions calypso/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[package]
name = "calypso"
version = "0.1.0"
edition = "2021"
rust-version = "1.79"
default-run = "calypso"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
socketcan = "3.3.1"
paho-mqtt.workspace = true
protobuf-codegen.workspace = true
protobuf.workspace = true
bitstream-io = "2.6.0"
clap.workspace = true
phf = { version = "0.11.2", features = ["macros"] }
calypso-cangen = { path = "../calypso-cangen" }
daedalus = { path = "../daedalus" }


[build-dependencies]
protobuf-codegen = "3.5.1"
calypso-cangen = { path = "../calypso-cangen" }
10 changes: 5 additions & 5 deletions build.rs → calypso/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@ use std::process;

/* Prebuild script */
fn main() {
println!("cargo:rerun-if-changed=Embedded-Base");
println!("cargo:rerun-if-changed=src/proto");

protobuf_codegen::Codegen::new()
.pure()
// All inputs and imports from the inputs must reside in `includes` directories.
.includes(["src/proto"])
.includes(["../calypso/src/proto"])
// Inputs must reside in some of include paths.
.input("src/proto/command_data.proto")
.input("src/proto/serverdata.proto")
.input("../calypso/src/proto/command_data.proto")
.input("../calypso/src/proto/serverdata.proto")
// Specify output directory relative to Cargo output directory.
.out_dir("src/proto")
.out_dir("../calypso/src/proto")
.run_from_script();

// Validate CAN spec
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit d6ea3af

Please sign in to comment.