rigless 0.3.0

Virtual hardware-in-the-loop runtime: run unmodified firmware on an emulated MCU with every peripheral, chip model and unit of virtual time in Rust, and a CPU core of its own that translates the firmware's instructions to host code
Documentation
[package]
name = "rigless"
version = "0.3.0"
description = "Virtual hardware-in-the-loop runtime: run unmodified firmware on an emulated MCU with every peripheral, chip model and unit of virtual time in Rust, and a CPU core of its own that translates the firmware's instructions to host code"
edition = "2024"
rust-version = "1.98.0"
# The generated register tables carry their vendor's license instead. `NOTICE` carries the long
# form.
license = "(MIT OR Apache-2.0) AND Apache-2.0"
authors = ["Wezley Sherman <wezley.sherman@riglesslabs.com>"]
repository = "https://gitlab.com/rigless-labs/rigless"
homepage = "https://riglesslabs.com"
readme = "README.md"
keywords = ["embedded", "emulation", "hil", "firmware", "stm32"]
categories = ["embedded", "simulation", "emulators"]
# The package is the library and the binary. The tests read the firmware image, the generator's
# fixture SVD, and paths of this repository, so they cannot run from a tarball and do not ship.
# The firmware is its own Cargo project. The vendor's SVD is 2 MB of input the committed tables
# are generated from. The rest is how this repository is built, not what a dependent compiles.
build = "build.rs"
exclude = [
  "/tests",
  "/firmware",
  "/ci",
  "/fuzz",
  "/.gitlab-ci.yml",
  "/clippy.toml",
  "/deny.toml",
  "/rustfmt.toml",
  "/rust-toolchain.toml",
  "**/*.svd",
]

[features]
default = ["cli", "pixracer"]
# The binary. A library user who wants none of its dependencies writes
# `default-features = false, features = ["pixracer"]`, since dropping the
# defaults otherwise drops the only board and its SoC as well.
cli = ["svd", "dep:clap", "dep:rigless-rtos", "dep:libc"]
svd = ["dep:svd-parser", "dep:anyhow"]
# One feature per SoC, which turns on `tables`, and one per board, which turns on its SoC's.
stm32f427 = ["tables"]
stm32h743 = ["tables"]
pixracer = ["stm32f427"]
matekh743 = ["stm32h743"]
# What every SoC's generated tables need of the crate. It's the SoC features' to turn on, and no
# use on its own.
tables = []

[[bin]]
name = "rigless"
required-features = ["cli"]

[lints]
workspace = true

[dependencies]
anyhow = { version = "1", default-features = false, features = ["std"], optional = true }
clap = { version = "4", default-features = false, features = ["std", "derive", "help", "usage", "error-context"], optional = true }
postcard = { version = "1", default-features = false, features = ["use-std"] }
# The kernels whose threads the binary's debugger shows.
rigless-rtos = { version = "0.2.0", optional = true }
serde = { version = "1", default-features = false, features = ["std", "derive"] }
sha2 = { version = "0.10", default-features = false }
svd-parser = { version = "0.14", default-features = false, features = ["expand"], optional = true }
thiserror = { version = "2", default-features = false }
# The core's code generator, and the exact floating point its instructions need.
cranelift-codegen = { version = "0.136", default-features = false, features = ["std", "host-arch"] }
cranelift-frontend = { version = "0.136", default-features = false, features = ["std"] }
cranelift-jit = { version = "0.136", default-features = false }
cranelift-module = { version = "0.136", default-features = false }
cranelift-native = { version = "0.136", default-features = false, features = ["std"] }
rustc_apfloat = { version = "0.2", default-features = false }
# The code generator's own memory and cache helpers, for the core's packed code memory.
region = { version = "3", default-features = false }
wasmtime-internal-jit-icache-coherence = { version = "49", default-features = false }

# What the binary catches Ctrl-C with, so a run it ends prints where it stopped.
[target.'cfg(unix)'.dependencies]
libc = { version = "0.2", default-features = false, optional = true }

[dev-dependencies]
proptest = { version = "1", default-features = false, features = ["std"] }

[workspace]
resolver = "3"

[workspace.lints.rust]
unsafe_code = "deny"
unsafe_op_in_unsafe_fn = "deny"
non_ascii_idents = "deny"
unstable_features = "deny"
missing_debug_implementations = "warn"
missing_docs = "warn"
unreachable_pub = "warn"
unused_qualifications = "warn"
trivial_casts = "warn"
trivial_numeric_casts = "warn"
unused_lifetimes = "warn"
single_use_lifetimes = "warn"
redundant_lifetimes = "warn"
unused_import_braces = "warn"
let_underscore_drop = "warn"
unit_bindings = "warn"
meta_variable_misuse = "warn"
rust_2018_idioms = { level = "warn", priority = -1 }

[workspace.lints.rustdoc]
broken_intra_doc_links = "deny"
private_intra_doc_links = "warn"
unescaped_backticks = "warn"
bare_urls = "warn"

[workspace.lints.clippy]
all = { level = "warn", priority = -1 }
pedantic = { level = "warn", priority = -1 }
cargo = { level = "warn", priority = -1 }
multiple_crate_versions = "allow"
unwrap_used = "deny"
dbg_macro = "deny"
todo = "deny"
unimplemented = "deny"
print_stdout = "deny"
print_stderr = "deny"
exit = "deny"
mem_forget = "deny"
undocumented_unsafe_blocks = "deny"
multiple_unsafe_ops_per_block = "deny"
unnecessary_safety_comment = "warn"
unnecessary_safety_doc = "warn"
allow_attributes = "deny"
allow_attributes_without_reason = "deny"
mod_module_files = "deny"
tests_outside_test_module = "warn"
map_err_ignore = "warn"
let_underscore_must_use = "warn"
string_slice = "warn"
as_underscore = "warn"
infinite_loop = "warn"
missing_errors_doc = "allow"
missing_panics_doc = "allow"
module_name_repetitions = "allow"
must_use_candidate = "allow"
similar_names = "allow"

[profile.release]
lto = "thin"
codegen-units = 1

[profile.profiling]
inherits = "release"
debug = 1
strip = false