Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
rust-mavlink
Pure Rust implementation of the MAVLink UAV messaging protocol. Provides strongly typed message bindings, frame encode/decode and connection APIs for serial, UDP, TCP, file connection protocols with a rich set of features.
What rust-mavlink provides
- Rust bindings for MAVLink dialects
- Read/write support for MAVLink v1 and v2
- TCP, UDP, Serial and File connection support.
- Signing support.
- Blocking and async support.
- std and embedded support.
- Codegen tool mavlink-bindgen for creating Rust bindings from MAVLink XML dialect definitions.
Workspace crates
| Crate | Purpose |
|---|---|
mavlink |
Main crate with generated dialect modules and high-level APIs |
mavlink-core |
Core protocol types, parser/serializer, and connection traits |
mavlink-bindgen |
XML-to-Rust code generator used by mavlink |
Quick start
Add the crate:
[]
= "0.20"
Simple code example:
use ;
Supported address formats
tcpin:<addr>:<port>: TCP servertcpout:<addr>:<port>: TCP clientudpin:<addr>:<port>: UDP listenerudpout:<addr>:<port>: UDP senderudpbcast:<addr>:<port>: UDP broadcast senderserial:<port>:<baudrate>: serial port connectionfile:<path>: read MAVLink frames from a file
Dialects
Compile-time dialects
Features such as dialect-ardupilotmega and dialect-common generate strongly
typed Rust messages from XML definitions during the build. Use these when the
message set is known at compile time. Changing the definitions requires rebuilding
the application.
Runtime dialects
The dialect-dynamic feature loads dialect XML definitions at runtime.
Runtime dialects are required when an application takes its dialect at runtime (e.g. from user configuration) and rebuilding the application for each custom dialect is not possible.
See the runtime-dialect example
for usage and testing it.
Feature flags
Transport and runtime:
embeddedstdtokiotransport-direct-serialtransport-tcptransport-udp
Protocol and code generation:
arbitraryformat-generated-codemav2-message-extensionsmav2-message-signingserdets-rs
Dialects:
dialect-alldialect-ardupilotmegadialect-asluavdialect-avssuasdialect-commondialect-csairlinkdialect-cubepilotdialect-developmentdialect-dynamic(unlike the generated dialects, loads dialects at runtime)dialect-icarousdialect-loweheiserdialect-marshdialect-minimaldialect-paparazzidialect-python_array_testdialect-standarddialect-stemstudiosdialect-storm32dialect-testdialect-ualbertadialect-uavionix
Note that std and embedded features are mutually exclusive.
Examples
See mavlink/examples/ for runnable examples.
Maintainers
See MAINTAINERS.md for active maintainers, release managers and contact details.
License
Licensed under either of:
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT) at your option.