Project setup
This commit is contained in:
95
Cargo.toml
95
Cargo.toml
@ -1,3 +1,6 @@
|
||||
#---------------------------------------------------------------------------------------------------------------------
|
||||
#----- Workspace ------------------------
|
||||
#---------------------------------------------------------------------------------------------------------------------
|
||||
[workspace]
|
||||
members = [
|
||||
# Device types
|
||||
@ -15,20 +18,84 @@ readme = "README.md"
|
||||
license = "MIT"
|
||||
|
||||
[workspace.dependencies]
|
||||
##### no-std #####
|
||||
# Error handling
|
||||
[workspace.dependencies.thiserror]
|
||||
version = "1.0.*"
|
||||
#----- no-std ----------------------------------
|
||||
# Math
|
||||
[workspace.dependencies.libm]
|
||||
version = "0.2.*"
|
||||
# Units of measurement
|
||||
[workspace.dependencies.uom]
|
||||
version = "0.34.*"
|
||||
default-features = false
|
||||
features = ["f32", "si"]
|
||||
# Logging
|
||||
[workspace.dependencies.tracing]
|
||||
version = "0.1.*"
|
||||
[workspace.dependencies.defmt]
|
||||
version = "0.3.*"
|
||||
[workspace.dependencies.defmt-rtt]
|
||||
version = "0.4.*"
|
||||
# Serialization
|
||||
[workspace.dependencies.parity-scale-codec]
|
||||
version = "3.5.*"
|
||||
# Embedded-HAL
|
||||
[workspace.dependencies.embedded-hal]
|
||||
version = "1.0.0-alpha.10"
|
||||
[workspace.dependencies.embedded-hal-async]
|
||||
version = "0.2.0-alpha.1"
|
||||
# Memory
|
||||
[workspace.dependencies.static_cell]
|
||||
version = "1.1.*"
|
||||
[workspace.dependencies.heapless]
|
||||
version = "0.7.*"
|
||||
# Other embedded utilities
|
||||
[workspace.dependencies.cortex-m]
|
||||
version = "0.7.*"
|
||||
[workspace.dependencies.cortex-m-rt]
|
||||
version = "0.7.*"
|
||||
[workspace.dependencies.panic-probe]
|
||||
version = "0.3.*"
|
||||
features = ["print-defmt"]
|
||||
# Embassy
|
||||
[workspace.dependencies.embassy-futures]
|
||||
version = "0.1.*"
|
||||
[workspace.dependencies.embassy-time]
|
||||
version = "0.1.*"
|
||||
features = ["defmt", "defmt-timestamp-uptime", "unstable-traits", "nightly", ]
|
||||
[workspace.dependencies.embassy-sync]
|
||||
version = "0.1.*"
|
||||
features = ["defmt"]
|
||||
[workspace.dependencies.embassy-embedded-hal]
|
||||
version = "0.1.*"
|
||||
features = ["nightly"]
|
||||
[workspace.dependencies.embassy-executor]
|
||||
version = "0.1.*"
|
||||
features = ["defmt", "arch-cortex-m", "integrated-timers", "executor-interrupt", "executor-thread", "nightly"]
|
||||
[workspace.dependencies.embassy-stm32]
|
||||
version = "0.1.*"
|
||||
features = ["defmt", "unstable-traits", "unstable-pac", "nightly"]
|
||||
[workspace.dependencies.embassy-nrf]
|
||||
version = "0.1.*"
|
||||
features = ["defmt", "unstable-traits", "nightly"]
|
||||
|
||||
#---------------------------------------------------------------------------------------------------------------------
|
||||
#----- Patch ------------------------
|
||||
#---------------------------------------------------------------------------------------------------------------------
|
||||
[patch.crates-io]
|
||||
embassy-executor = { git = "https://github.com/embassy-rs/embassy", rev = "047ea9066f0d946fd4d706577b21df38fd3b1647" }
|
||||
embassy-time = { git = "https://github.com/embassy-rs/embassy", rev = "047ea9066f0d946fd4d706577b21df38fd3b1647" }
|
||||
embassy-futures = { git = "https://github.com/embassy-rs/embassy", rev = "047ea9066f0d946fd4d706577b21df38fd3b1647" }
|
||||
embassy-sync = { git = "https://github.com/embassy-rs/embassy", rev = "047ea9066f0d946fd4d706577b21df38fd3b1647" }
|
||||
embassy-embedded-hal = { git = "https://github.com/embassy-rs/embassy", rev = "047ea9066f0d946fd4d706577b21df38fd3b1647" }
|
||||
embassy-net = { git = "https://github.com/embassy-rs/embassy", rev = "047ea9066f0d946fd4d706577b21df38fd3b1647" }
|
||||
embassy-net-driver = { git = "https://github.com/embassy-rs/embassy", rev = "047ea9066f0d946fd4d706577b21df38fd3b1647" }
|
||||
embassy-net-driver-channel = { git = "https://github.com/embassy-rs/embassy", rev = "047ea9066f0d946fd4d706577b21df38fd3b1647" }
|
||||
embassy-nrf = { git = "https://github.com/embassy-rs/embassy", rev = "047ea9066f0d946fd4d706577b21df38fd3b1647" }
|
||||
embassy-stm32 = { git = "https://github.com/embassy-rs/embassy", rev = "047ea9066f0d946fd4d706577b21df38fd3b1647" }
|
||||
embassy-rp = { git = "https://github.com/embassy-rs/embassy", rev = "047ea9066f0d946fd4d706577b21df38fd3b1647" }
|
||||
|
||||
#---------------------------------------------------------------------------------------------------------------------
|
||||
#----- Package ------------------------
|
||||
#---------------------------------------------------------------------------------------------------------------------
|
||||
[package]
|
||||
name = "physical"
|
||||
description = "Physical is a library for interacting with the physical world."
|
||||
@ -40,3 +107,23 @@ license.workspace = true
|
||||
|
||||
[dependencies]
|
||||
uom = { workspace = true }
|
||||
parity-scale-codec = { workspace = true }
|
||||
|
||||
#---------------------------------------------------------------------------------------------------------------------
|
||||
#----- Profiles ------------------------
|
||||
#---------------------------------------------------------------------------------------------------------------------
|
||||
[profile.release]
|
||||
opt-level = 3
|
||||
lto = true
|
||||
codegen-units = 1
|
||||
panic = "abort"
|
||||
|
||||
[profile.dev]
|
||||
opt-level = 3
|
||||
debug = true
|
||||
debug-assertions = true
|
||||
overflow-checks = true
|
||||
lto = true
|
||||
panic = "abort"
|
||||
incremental = false
|
||||
codegen-units = 1
|
@ -7,8 +7,7 @@ repository.workspace = true
|
||||
readme.workspace = true
|
||||
license.workspace = true
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
physical = { path = ".." }
|
||||
tracing.workspace = true
|
||||
[dependencies.physical]
|
||||
path = ".."
|
||||
[dependencies.tracing]
|
||||
workspace = true
|
@ -7,7 +7,15 @@ repository.workspace = true
|
||||
readme.workspace = true
|
||||
license.workspace = true
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
physical = { path = ".." }
|
||||
[dependencies.physical]
|
||||
path = ".."
|
||||
[dependencies.embedded-hal]
|
||||
workspace = true
|
||||
[dependencies.embedded-hal-async]
|
||||
workspace = true
|
||||
[dependencies.defmt]
|
||||
workspace = true
|
||||
[dependencies.uom]
|
||||
workspace = true
|
||||
[dependencies.embassy-sync]
|
||||
workspace = true
|
14
rust-toolchain.toml
Normal file
14
rust-toolchain.toml
Normal file
@ -0,0 +1,14 @@
|
||||
# Before upgrading check that everything is available on all tier1 targets here:
|
||||
# https://rust-lang.github.io/rustup-components-history
|
||||
[toolchain]
|
||||
channel = "nightly-2023-04-18"
|
||||
components = [ "rust-src", "rustfmt", "llvm-tools-preview" ]
|
||||
targets = [
|
||||
"thumbv7em-none-eabi",
|
||||
"thumbv7m-none-eabi",
|
||||
"thumbv6m-none-eabi",
|
||||
"thumbv7em-none-eabihf",
|
||||
"thumbv8m.main-none-eabihf",
|
||||
"riscv32imac-unknown-none-elf",
|
||||
"wasm32-unknown-unknown",
|
||||
]
|
Reference in New Issue
Block a user