content: [workspace]
  members = [
    "nucleus",
    "bin/chainboot",
    "bin/chainofcommand",
    # Libraries
    "libs/boot",
    "libs/console",
    "libs/cpu",
    "libs/driver",
    "libs/exception",
    "libs/kernel-state",
    "libs/local-irq",
    "libs/locking",
    "libs/log",
    "libs/machine",
    "libs/memory",
    "libs/platform",
    "libs/primitives",
    "libs/qemu",
    "libs/test",
    "libs/time",
  ]
  resolver = "2"
  
  [workspace.package]
  authors = ["Berkus Decker <berkus+vesper@metta.systems>"]
  categories = ["embedded", "no-std", "os"]
  documentation = "https://docs.metta.systems/vesper"
  edition = "2024"
  homepage = "https://github.com/metta-systems/vesper"
  license = "BlueOak-1.0.0"
  publish = false
  readme = "README.md"
  repository = "https://github.com/metta-systems/vesper"
  version = "0.0.1"
  
  [workspace.dependencies]
  #========
  # target
  #========
  aarch64-cpu = { version = "10.0" }
  bit_field = { version = "0.10" }
  bitflags = { version = "2.9" }
  buddy-alloc = { version = "0.6.0", git = "https://github.com/metta-systems/buddy-alloc", branch = "feature/allocator-api" }
  cfg-if = { version = "1.0" }
  libboot = { path = "libs/boot" }
  libconsole = { path = "libs/console" }
  libcpu = { path = "libs/cpu" }
  libdriver = { path = "libs/driver" }
  libexception = { path = "libs/exception" }
  libkernel-state = { path = "libs/kernel-state" }
  liblocal-irq = { path = "libs/local-irq" }
  liblocking = { path = "libs/locking" }
  liblog = { path = "libs/log" }
  libmachine = { path = "libs/machine" }
  libmemory = { path = "libs/memory" }
  libplatform = { path = "libs/platform" }
  libprimitives = { path = "libs/primitives" }
  libqemu = { path = "libs/qemu" }
  libtest = { path = "libs/test" }
  libtime = { path = "libs/time" }
  once_cell = { version = "1.21", default-features = false, features = ["unstable"] }
  qemu-exit = { version = "3.0" }
  snafu = { version = "0.8", default-features = false, features = ["unstable-core-error"] }
  tock-registers = { version = "0.9" }
  usize_conversions = { version = "0.2" }
  ux = { version = "0.1", default-features = false }
  #======
  # host
  #======
  anyhow = { version = "1.0" }
  argh = { version = "0.1" }
  bytes = { version = "1.10" }
  crossterm = { version = "0.29", features = ["event-stream"] }
  futures = { version = "0.3" }
  futures-util = { version = "0.3", features = ["io"] }
  tokio = { version = "1.47", features = ["full"] }
  tokio-serial = { version = "5.4" }
  tokio-stream = { version = "0.1" }
  tokio-util = { version = "0.7", features = ["codec", "io"] }
  #=======
  # mixed
  #=======
  seahash = { version = "4.1" }
  
  [patch.crates-io]
  serialport = { git = "https://github.com/metta-systems/serialport-rs", branch = "macos-ENOTTY-fix" }
  
  [profile.dev]
  # See https://github.com/rust-lang/cargo/issues/7359 about why panic=abort is not working here.
  # It is still defined in the target JSON so not stricly necessary to specify it here anyway.
  #panic = "abort" # @todo try panic_rtt with feature jlink
  opt-level = 's' # otherwise boot code will be mangled
  
  [profile.release]
  codegen-units = 1
  debug = true
  lto = true
  opt-level = 's'
  panic = "abort"
  
  [profile.release-fast]
  codegen-units = 16
  inherits = "release"
  lto = "thin"
  
  [profile.test]
  debug = true
  opt-level = 's'
  
  [workspace.lints.rust]
  unexpected_cfgs = { level = "allow", check-cfg = ['cfg(board_rpi3)', 'cfg(board_rpi4)'] }
  
  # Enable a batch of clippy lints
  # Reference: https://rust-lang.github.io/rust-clippy/master/index.html
  # There is no need to specify lints that are already "warn" or "deny" by default.
  [workspace.lints.clippy]
  absolute_paths = "deny"
  arithmetic_side_effects = "allow" # Temporarily: need to enable this and clean all potentially failing arithmetic.
  as_ptr_cast_mut = "deny"
  assertions_on_result_states = "deny"
  bool_to_int_with_if = "deny"
  borrow_as_ptr = "deny"
  case_sensitive_file_extension_comparisons = "deny"
  cast_lossless = "deny"
  cast_possible_truncation = "deny"
  cast_possible_wrap = "deny"
  cast_precision_loss = "deny"
  cast_sign_loss = "deny"
  cast_ptr_alignment = "deny"
  checked_conversions = "deny"
  clone_on_ref_ptr = "deny"
  cloned_instead_of_copied = "deny"
  copy_iterator = "deny"
  create_dir = "deny"
  default_trait_access = "deny"
  default_union_representation = "deny"
  deref_by_slicing = "deny"
  doc_link_with_quotes = "deny"
  doc_markdown = "deny"
  empty_drop = "deny"
  empty_enum_variants_with_brackets = "deny"
  enum_glob_use = "deny"
  exhaustive_enums = "allow" # We want to have strict enum checks in the kernel code
  exit = "deny"
  expl_impl_clone_on_copy = "deny"
  explicit_deref_methods = "deny"
  explicit_into_iter_loop = "deny"
  explicit_iter_loop = "deny"
  filetype_is_file = "deny"
  filter_map_next = "deny"
  flat_map_option = "deny"
  float_cmp = "deny"
  float_cmp_const = "deny"
  fn_params_excessive_bools = "deny"
  fn_to_numeric_cast_any = "deny"
  format_push_string = "deny"
  from_iter_instead_of_collect = "deny"
  get_unwrap = "deny"
  if_not_else = "deny"
  if_then_some_else_none = "deny"
  ignored_unit_patterns = "deny"
  implicit_clone = "deny"
  implicit_hasher = "deny"
  inconsistent_struct_constructor = "deny"
  index_refutable_slice = "deny"
  indexing_slicing = "allow" # There's just toooooo many
  inefficient_to_string = "deny"
  infinite_loop = "deny"
  inline_always = "allow" # We're serious tough dudes here!
  integer_division = "allow" # Temporarily, while I figure out what to do with those divs
  into_iter_without_iter = "deny"
  invalid_upcast_comparisons = "deny"
  items_after_statements = "deny"
  iter_filter_is_ok = "deny"
  iter_filter_is_some = "deny"
  iter_not_returning_iterator = "deny"
  iter_without_into_iter = "deny"
  large_digit_groups = "deny"
  large_futures = "deny"
  large_include_file = "deny"
  large_stack_arrays = "deny"
  large_types_passed_by_value = "deny"
  let_underscore_must_use = "deny"
  let_underscore_untyped = "deny"
  linkedlist = "deny"
  lossy_float_literal = "deny"
  macro_use_imports = "deny"
  manual_assert = "deny"
  manual_c_str_literals = "deny"
  manual_instant_elapsed = "deny"
  manual_is_variant_and = "deny"
  manual_let_else = "deny"
  manual_ok_or = "deny"
  manual_string_new = "deny"
  many_single_char_names = "deny"
  map_err_ignore = "deny"
  map_unwrap_or = "deny"
  match_bool = "deny"
  match_same_arms = "deny"
  match_wild_err_arm = "deny"
  match_wildcard_for_single_variants = "deny"
  maybe_infinite_iter = "deny"
  mem_forget = "deny"
  mismatching_type_param_order = "deny"
  missing_asserts_for_indexing = "deny"
  missing_fields_in_debug = "deny"
  missing_safety_doc = "deny"
  mixed_read_write_in_expression = "deny"
  mod_module_files = "allow"
  module_name_repetitions = "allow" # Temporarily, because there are too many - but clean this up!
  multiple_inherent_impl = "allow" # We use this to have multiple platform-dependent impl pieces.
  multiple_unsafe_ops_per_block = "allow" # Don't know how to fix these statics yet.
  mut_mut = "deny"
  mutex_atomic = "deny"
  naive_bytecount = "deny"
  needless_bitwise_bool = "deny"
  needless_continue = "deny"
  needless_for_each = "deny"
  needless_pass_by_value = "deny"
  needless_raw_string_hashes = "deny"
  negative_feature_names = "deny"
  no_effect_underscore_binding = "deny"
  no_mangle_with_rust_abi = "deny"
  option_as_ref_cloned = "deny"
  option_option = "deny"
  partial_pub_fields = "deny"
  ptr_as_ptr = "deny"
  ptr_cast_constness = "deny"
  pub_underscore_fields = "deny"
  pub_without_shorthand = "deny"
  range_minus_one = "deny"
  range_plus_one = "deny"
  rc_buffer = "deny"
  rc_mutex = "deny"
  redundant_closure_for_method_calls = "deny"
  redundant_else = "deny"
  redundant_feature_names = "deny"
  redundant_type_annotations = "deny"
  ref_as_ptr = "deny"
  ref_binding_to_reference = "deny"
  ref_option_ref = "deny"
  renamed_function_params = "allow" # We prefer semantically sensible names, not just `rhs`.
  rest_pat_in_fully_bound_structs = "deny"
  return_self_not_must_use = "deny"
  same_functions_in_if_condition = "deny"
  same_name_method = "deny"
  semicolon_if_nothing_returned = "deny"
  semicolon_inside_block = "deny"
  similar_names = "deny"
  single_char_pattern = "deny"
  stable_sort_primitive = "deny"
  str_split_at_newline = "deny"
  string_lit_chars_any = "deny"
  string_slice = "deny"
  struct_excessive_bools = "deny"
  struct_field_names = "deny"
  suspicious_xor_used_as_pow = "deny"
  tests_outside_test_module = "deny"                 # blocked by https://github.com/rust-lang/rust-clippy/pull/13038
  trivially_copy_pass_by_ref = "deny"
  try_err = "deny"
  unchecked_duration_subtraction = "deny"
  undocumented_unsafe_blocks = "deny"
  unimplemented = "allow" # A lot of things are still unimplemented, but when it's ready...
  uninlined_format_args = "deny"
  unnecessary_box_returns = "deny"
  unnecessary_join = "deny"
  unnecessary_safety_comment = "deny"
  unnecessary_safety_doc = "deny"
  unnecessary_self_imports = "deny"
  unnecessary_wraps = "deny"
  unneeded_field_pattern = "deny"
  unnested_or_patterns = "deny"
  unsafe_derive_deserialize = "deny"
  unseparated_literal_suffix = "deny"
  unused_async = "deny"
  unused_self = "deny"
  use_debug = "deny"
  used_underscore_binding = "deny"
  verbose_bit_mask = "deny"
  verbose_file_reads = "deny"
  wildcard_dependencies = "deny"
  zero_sized_map_values = "deny"
  