Skip to main content

nros_std_msgs/
lib.rs

1//! Generated nros bindings
2//!
3//! This crate is `no_std` compatible.
4
5#![no_std]
6#![allow(dead_code)]
7#![allow(clippy::all)]
8
9/// The nros codegen version this crate was emitted at (phase-429 W1).
10///
11/// The runtime declares the versions it accepts in `nros_core::codegen_version`;
12/// the assertion below is what turns a disagreement into a build failure rather
13/// than a wrong field offset several frames down at run time.
14pub const NROS_EMITTED_CODEGEN_VERSION: u32 = 18;
15
16// Crate scope, deliberately: rustc evaluates a crate-scope `const` item for a
17// crate that is merely COMPILED, so `cargo check` reports this. An inline
18// `const {}` block inside a generic (RFC-0088's `format_check`) is
19// monomorphisation-timed, and `cargo check` never sees it.
20const _: () = assert!(
21    nros_core::codegen_version::accepts(NROS_EMITTED_CODEGEN_VERSION),
22    "this crate's NROS_EMITTED_CODEGEN_VERSION (declared just above) is not \
23     accepted by the nros-core it is being compiled against -- compare it with \
24     nros_core::codegen_version. Regenerate the generated/ tree with this \
25     checkout's codegen: `nros sync` in a consumer workspace, or \
26     `just generate-bindings` in-tree."
27);
28
29pub mod msg;