Skip to content

Commit

Permalink
Merge pull request #100 from uorocketry/messages_derive_cleanup
Browse files Browse the repository at this point in the history
Messages derives cleanup
  • Loading branch information
jonapap authored Mar 20, 2024
2 parents ebef0e4 + 7a85e2d commit a13b069
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 90 deletions.
5 changes: 0 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,6 @@ jobs:
with:
command: make
args: test-host
- uses: actions-rs/cargo@v1
name: "Generate Typescript bindings"
with:
command: make
args: generate-ts-bindings
- uses: actions/upload-artifact@v3
name: "Upload Binding Artifacts"
with:
Expand Down
79 changes: 9 additions & 70 deletions Cargo.lock

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

7 changes: 0 additions & 7 deletions Makefile.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,6 @@ CARGO_MAKE_EXTEND_WORKSPACE_MAKEFILE = true
[config]
default_to_workspace = false

# -----------------------
# Typescript Bindings
# -----------------------
[tasks.generate-ts-bindings]
command = "cargo"
args = ["test", "-p", "messages", "--no-default-features", "--features", "ts", "--target", "${CARGO_MAKE_RUST_TARGET_TRIPLE}"]

# -----------------------
# Host Testing
# -----------------------
Expand Down
1 change: 0 additions & 1 deletion libraries/messages/.gitignore

This file was deleted.

4 changes: 0 additions & 4 deletions libraries/messages/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,12 @@ name = "messages"
version = "0.1.0"
edition = "2021"

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

[dependencies]
derive_more = "0.99.17"
serde = { workspace = true }
defmt = "0.3.2"
fugit = "0.3.6"
heapless = "0.7.16"
ts-rs = { version = "6.2.1", optional = true }
mavlink = { git = "https://github.com/uorocketry/rust-mavlink", default-features = false }
bitflags = { version = "2.3.1", features = ["serde"] }
proptest = { version = "1.2.0", optional = true }
Expand All @@ -26,4 +23,3 @@ postcard = { version = "1.0.4", features = ["alloc"] }
[features]
default = ["mavlink/embedded", "mavlink/uorocketry"]
std = ["mavlink/default", "dep:proptest", "dep:proptest-derive"]
ts = ["std", "dep:ts-rs"]
4 changes: 1 addition & 3 deletions libraries/messages/messages-proc-macros-lib/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ use quote::quote;
pub fn common_derives(args: TokenStream, input: TokenStream) -> TokenStream {
let mut output = TokenStream::from(quote! {
#[derive(serde::Serialize, serde::Deserialize, Clone, Debug)]
#[cfg_attr(feature = "ts", derive(ts_rs::TS))]
#[cfg_attr(feature = "ts", ts(export))]
#[cfg_attr(test, derive(proptest_derive::Arbitrary))]
#[cfg_attr(feature = "std", derive(proptest_derive::Arbitrary))]
});

// Allow to omit the defmt::Format derive. Useful if this should be manually implemented.
Expand Down

0 comments on commit a13b069

Please sign in to comment.