-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Restructure project to enable custom mavlink bindings generation (#223)
* Restructure project to enable custom mavlink bindings generation Split the project into three crates: * mavlink-core: core MAVLink types including TCP, UDP and serial connections * mavlink-bindgen: a library & CLI for generating Rust bindings for MAVLink dialects * mavlink: generated MAVLink bindings for the MAVLink dialects in the mavlink/mavlink repo * run GitHub checks * reformat * attempt to fix cross compile test * attempt to install cross * Downgrade clap to support MSRV 1.65.0 * Downgrade clap_lex to support MSRV 1.65.0 * Another downgrade * downgrade anstyle * Simplify support for MSRV 1.65.0 * Hopefully this works * fix embedded build * Fix build on MSRV * Make cli feature not default * Only build the mavlink package in tests. The mavlink-bindgen crate does not itself need to run on embedded hardware * Attempt to support no_std in mavlink again * Fix for the last GitHub action * Make the embedded example work in the cargo workspace * Remove unused import * Remove accidentally committed binary
- Loading branch information
1 parent
be0bc1e
commit 09411e9
Showing
48 changed files
with
555 additions
and
227 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
[submodule "mavlink"] | ||
path = mavlink | ||
[submodule "mavlink/mavlink"] | ||
path = mavlink/mavlink | ||
url = https://github.com/mavlink/mavlink |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,105 +1,10 @@ | ||
[workspace] | ||
members = ["mavlink", "mavlink-bindgen", "mavlink-core"] | ||
resolver = "1" | ||
|
||
[package] | ||
name = "mavlink" | ||
version = "0.12.2" | ||
authors = ["Todd Stellanova", "Michal Podhradsky", "Kevin Mehall", "Tim Ryan", "Patrick José Pereira", "Ibiyemi Abiodun"] | ||
build = "build/main.rs" | ||
description = "Implements the MAVLink data interchange format for UAVs." | ||
readme = "README.md" | ||
license = "MIT/Apache-2.0" | ||
repository = "https://github.com/mavlink/rust-mavlink" | ||
edition = "2018" | ||
rust-version = "1.65.0" | ||
|
||
[build-dependencies] | ||
crc-any = { version = "2.3.0", default-features = false } | ||
quick-xml = "0.26" | ||
quote = "1" | ||
proc-macro2 = "1.0.43" | ||
lazy_static = "1.2.0" | ||
serde = { version = "1.0.115", optional = true, features = ["derive"] } | ||
|
||
[[example]] | ||
name = "mavlink-dump" | ||
path = "examples/mavlink-dump/src/main.rs" | ||
required-features = ["ardupilotmega"] | ||
|
||
[dependencies] | ||
[workspace.dependencies] | ||
crc-any = { version = "2.3.5", default-features = false } | ||
num-traits = { version = "0.2", default-features = false } | ||
num-derive = "0.3.2" | ||
bitflags = "1.2.1" | ||
serial = { version = "0.4", optional = true } | ||
serde = { version = "1.0.115", optional = true, features = ["derive"] } | ||
byteorder = { version = "1.3.4", default-features = false } | ||
embedded-hal = { version = "0.2", optional = true } | ||
nb = { version = "1.0", optional = true } | ||
serde_arrays = { version = "0.1.0", optional = true } | ||
|
||
[features] | ||
"all" = [ | ||
"ardupilotmega", | ||
"asluav", | ||
"common", | ||
"development", | ||
"icarous", | ||
"minimal", | ||
"python_array_test", | ||
"standard", | ||
"test", | ||
"ualberta", | ||
"uavionix", | ||
"avssuas", | ||
"cubepilot", | ||
] | ||
"ardupilotmega" = ["common", "icarous", "uavionix"] | ||
"asluav" = ["common"] | ||
"avssuas" = ["common"] | ||
"development" = ["common"] | ||
"matrixpilot" = ["common"] | ||
"minimal" = [] | ||
"paparazzi" = ["common"] | ||
"python_array_test" = ["common"] | ||
"slugs" = ["common"] | ||
"standard" = ["common"] | ||
"test" = [] | ||
"ualberta" = ["common"] | ||
"uavionix" = ["common"] | ||
"icarous" = [] | ||
"common" = [] | ||
"cubepilot" = ["common"] | ||
|
||
"all-dialects" = [ | ||
"ardupilotmega", | ||
"asluav", | ||
"avssuas", | ||
"development", | ||
"matrixpilot", | ||
"minimal", | ||
"paparazzi", | ||
"python_array_test", | ||
"slugs", | ||
"standard", | ||
"test", | ||
"ualberta", | ||
"uavionix", | ||
"icarous", | ||
"common", | ||
"cubepilot", | ||
] | ||
|
||
"format-generated-code" = [] | ||
"emit-description" = [] | ||
"emit-extensions" = [] | ||
"std" = ["byteorder/std"] | ||
"udp" = [] | ||
"tcp" = [] | ||
"direct-serial" = [] | ||
"embedded" = ["embedded-hal", "nb"] | ||
"serde" = ["dep:serde", "dep:serde_arrays"] | ||
default = ["std", "tcp", "udp", "direct-serial", "serial", "serde", "ardupilotmega"] | ||
|
||
# build with all features on docs.rs so that users viewing documentation | ||
# can see everything | ||
[package.metadata.docs.rs] | ||
features = ["default", "all-dialects", "emit-description", "emit-extensions", "format-generated-code"] |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.