Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restructure project to enable custom mavlink bindings generation #223

Merged
merged 20 commits into from
Feb 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ jobs:
- uses: dtolnay/rust-toolchain@master
with:
toolchain: 1.65.0
- uses: actions-rs/cargo@v1
with:
command: install
args: cross --locked
- uses: actions-rs/cargo@v1
with:
use-cross: true
Expand Down Expand Up @@ -103,7 +107,7 @@ jobs:
with:
use-cross: true
command: build
args: --verbose --release --target=${{ matrix.TARGET }} ${{ matrix.FLAGS }}
args: --verbose --release --package=mavlink --target=${{ matrix.TARGET }} ${{ matrix.FLAGS }}

test-embedded-size:
needs: build
Expand All @@ -114,7 +118,7 @@ jobs:
with:
target: thumbv7em-none-eabihf
- name: Build
run: cargo +nightly build --target thumbv7em-none-eabihf --manifest-path examples/embedded/Cargo.toml --out-dir $PWD --release -Z unstable-options
run: cargo +nightly build --target thumbv7em-none-eabihf --manifest-path mavlink/examples/embedded/Cargo.toml --out-dir $PWD --release -Z unstable-options

docs:
needs: internal-tests
Expand Down
4 changes: 2 additions & 2 deletions .gitmodules
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
128 changes: 128 additions & 0 deletions .idea/workspace.xml

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

103 changes: 4 additions & 99 deletions Cargo.toml
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"]
101 changes: 0 additions & 101 deletions build/main.rs

This file was deleted.

Loading
Loading