cu29/
lib.rs

1//! # Copper Runtime & SDK
2//!
3//! Think of Copper as a robotics game engine: define a task graph, compile once,
4//! and get deterministic execution, unified logging, and sub-microsecond
5//! latency from Linux workstations all the way down to bare-metal MPU builds.
6//!
7//! ## Quick start
8//!
9//! ```bash
10//! cargo install cargo-generate
11//! git clone https://github.com/copper-project/copper-rs
12//! cd copper-rs/templates
13//! cargo cunew /path/to/my_robot   # scaffolds a full Copper project
14//! ```
15//!
16//! It will generate a minimal Copper robot project at `/path/to/my_robot`. `cargo build` should
17//! compile it out of the box.
18//!
19//! ## Concepts behind Copper
20//!
21//! Check out the [Copper Wiki](https://github.com/copper-project/copper-rs/wiki) to understand the
22//! deployments concepts, task lifecycle, available components, etc ...
23//!
24//! ## More examples to get you started
25//!
26//! - `examples/cu_caterpillar`: a minimal running example passing around booleans.  
27//! - `examples/cu_rp_balancebot`: a more complete example try Copper without hardware via
28//!   `cargo install cu-rp-balancebot` + `balancebot-sim` (Bevy + Avian3d).
29//!
30//! ## Key traits and structs to check out
31//!
32//! - `cu29_runtime::app::CuApp`: the main trait the copper runtime will expose to run your application. (when run() etc .. is coming from)
33//! - `cu29_runtime::config::CuConfig`: the configuration of your runtime
34//! - `cu29_runtime::cutask::CuTask`: the core trait and helpers to implement your own tasks.
35//! - `cu29_runtime::cubridge::CuBridge`: the trait to implement bridges to hardware or other software.
36//! - `cu29_runtime::curuntime::CuRuntime`: the runtime that manages task execution.
37//! - `cu29_runtime::simulation`: This will explain how to hook up your tasks to a simulation environment.
38//!
39//! Need help or want to show what you're building? Join
40//! [Discord](https://discord.gg/VkCG7Sb9Kw) and hop into the #general channel.
41//!
42
43#![cfg_attr(not(feature = "std"), no_std)]
44#[cfg(not(feature = "std"))]
45extern crate alloc;
46
47pub use cu29_runtime::config;
48pub use cu29_runtime::copperlist;
49#[cfg(feature = "std")]
50pub use cu29_runtime::cuasynctask;
51pub use cu29_runtime::cubridge;
52pub use cu29_runtime::curuntime;
53pub use cu29_runtime::cutask;
54pub use cu29_runtime::input_msg;
55pub use cu29_runtime::monitoring;
56pub use cu29_runtime::output_msg;
57pub use cu29_runtime::payload;
58pub use cu29_runtime::rx_channels;
59#[cfg(feature = "std")]
60pub use cu29_runtime::simulation;
61pub use cu29_runtime::tx_channels;
62
63pub use bincode;
64pub use cu29_clock as clock;
65#[cfg(feature = "std")]
66pub use cu29_runtime::config::read_configuration;
67pub use cu29_traits::*;
68
69#[cfg(feature = "std")]
70pub use rayon;
71
72pub mod prelude {
73    #[cfg(feature = "std")]
74    pub use ctrlc;
75    pub use cu29_clock::*;
76    pub use cu29_derive::*;
77    pub use cu29_log::*;
78    pub use cu29_log_derive::*;
79    pub use cu29_log_runtime::*;
80    pub use cu29_runtime::app::*;
81    pub use cu29_runtime::config::*;
82    pub use cu29_runtime::copperlist::*;
83    pub use cu29_runtime::cubridge::*;
84    pub use cu29_runtime::curuntime::*;
85    pub use cu29_runtime::cutask::*;
86    pub use cu29_runtime::input_msg;
87    pub use cu29_runtime::monitoring::*;
88    pub use cu29_runtime::output_msg;
89    pub use cu29_runtime::payload::*;
90    pub use cu29_runtime::rx_channels;
91    #[cfg(feature = "std")]
92    pub use cu29_runtime::simulation::*;
93    pub use cu29_runtime::tx_channels;
94    pub use cu29_runtime::*;
95    pub use cu29_traits::*;
96    pub use cu29_unifiedlog::*;
97    pub use cu29_value::to_value;
98    pub use cu29_value::Value;
99    #[cfg(feature = "std")]
100    pub use pool::*;
101    pub use serde::Serialize;
102}