content: cargo-features = [
      # Allows setting a different target triple on a per-crate level. This is
      # required to include platform crates (which require specific target
      # triples) in the main workspace.
      #
      # See: https://doc.rust-lang.org/cargo/reference/unstable.html#per-package-target
      "per-package-target",
      # Some platform implementations require specific RUSTFLAGS environment
      # variables to configure the compiler's behavior, such as setting linker
      # arguments. This unstable feature allows us to configure these RUSTFLAGS in
      # the Cargo.toml on a per-crate basis, rather than requiring a separate
      # `.cargo/config.toml` in each platform crate (and necessitating `cd`ing
      # into those crates' directories in order to build the crate).
      #
      # See: https://doc.rust-lang.org/cargo/reference/unstable.html#profile-rustflags-option
      "profile-rustflags",
  ]
  
  [workspace]
  resolver = "2"
  members = [
      # mnemOS source
      "source/*",
  
      # tools
      "tools/*",
  
      # platforms
      "platforms/allwinner-d1",
      "platforms/allwinner-d1/d1-config",
      "platforms/allwinner-d1/d1-core",
      "platforms/beepy",
      "platforms/esp32c3-buddy",
      "platforms/melpomene",
      "platforms/melpomene/melpo-config",
      "platforms/x86_64/*",
      "platforms/pomelo",
  ]
  # By default, run cargo commands without a specific package against everything
  # that can build cross-platform. This avoids incompatible feature unification
  # while running `cargo check`/`cargo fmt`/etc for most workspace crates.
  #
  # Incompatible crates are checked/built/formatted/documented individually by the
  # `just check`, `just clippy`, `just docs`, and `just fmt` Just recipes.
  default-members = [
      # mnemOS source
      "source/*",
  
      # tools
      # note that this skips `manganese` by default, so that we don't build its
      # dependency features when running `cargo check --all-features` and similar.
      #
      # also, crowtty is excluded by default, as it depends on `libudev` on Linux,
      # and we would like to be able to build documentation without having to
      # install libudev on CI.
      "tools/libcrowtty",
      "tools/dumbloader",
      "tools/f3repl",
      "tools/x86_64-bootimager",
  
      # platforms
      "platforms/melpomene",
      "platforms/melpomene/melpo-config",
      "platforms/allwinner-d1/d1-config",
      "platforms/allwinner-d1/d1-core",
  ]
  # this isn't actually a crate
  exclude = ["source/notes"]
  
  ### workspace dependencies ###
  
  [workspace.package]
  edition = "2021"
  repository = "https://github.com/tosc-rs/mnemos"
  homepage = "https://mnemos.dev"
  license = "MIT OR Apache-2.0"
  
  [workspace.dependencies]
  cordyceps = { version = "0.3", default-features = false }
  hal-core = { version = "0.1.0" }
  maitake = { version = "0.1.0", default-features = false }
  miette = "7.2"
  mycelium-alloc = { version = "0.1.0", features = ["buddy", "bump"] }
  mycelium-bitfield = { version = "0.1.5" }
  mycelium-util = { version = "0.1.0" }
  
  ### profile settings ###
  
  [profile.release]
  lto = 'thin' # better optimizations at a lower cost
  # symbols are nice and they don't increase the size on Flash
  debug = true
  
  ## profile settings for D1 ##
  
  [profile.release.package.mnemos-d1]
  codegen-units = 1 # better optimizations
  # faster optimizations --- we don't need opt-level='s'/'z' on D1, since we have
  # a whopping 1GB of RAM!
  opt-level = 3
  
  [profile.dev.package.mnemos-d1]
  # faster optimizations --- we don't need opt-level='s'/'z' on D1, since we have
  # a whopping 1GB of RAM!
  opt-level = 3
  
  ## profile settings for esp32c3-buddy ##
  
  [profile.release.package.mnemos-esp32c3-buddy]
  codegen-units = 1 # better optimizations
  # opt-level='z' is broken on esp32c3.
  #
  # See: https://github.com/esp-rs/esp-hal/pull/198
  opt-level = "s"
  rustflags = [
      "-C", "link-arg=-Tlinkall.x",
      # Required to obtain backtraces (e.g. when using the "esp-backtrace" crate.)
      # NOTE: May negatively impact performance of produced code
      "-C", "force-frame-pointers",
  ]
  
  [profile.dev.package.mnemos-esp32c3-buddy]
  codegen-units = 1 # better optimizations
  # opt-level='z' is broken on esp32c3.
  #
  # See: https://github.com/esp-rs/esp-hal/pull/198
  opt-level = "s"
  # symbols are nice and they don't increase the size on Flash
  rustflags = [
      "-C", "link-arg=-Tlinkall.x",
      # Required to obtain backtraces (e.g. when using the "esp-backtrace" crate.)
      # NOTE: May negatively impact performance of produced code
      "-C", "force-frame-pointers",
  ]
  
  ## profile settings for x86_64 ##
  
  [profile.release.package.mnemos-x86_64]
  codegen-units = 1 # better optimizations
  # faster optimizations --- we don't need to optimize for size on x86
  opt-level = 3
  
  [profile.dev.package.mnemos-x86_64]
  # faster optimizations --- we don't need to optimize for size on x86
  opt-level = 3
  
  ## profile settings for host tools ##
  [profile.release.package.crowtty]
  # only generate the debuginfo needed for backtraces, speeding
  # up the build a bit.
  debug = "line-tables-only"
  
  [profile.release.package.melpomene]
  # only generate the debuginfo needed for backtraces, speeding
  # up the build a bit.
  debug = "line-tables-only"
  
  ### patches ###
  
  [patch.crates-io.maitake]
  git = "https://github.com/hawkw/mycelium"
  rev = "ba56bb4d02f46fb59754b7b88bddc2e8ca99c1f5"
  
  [patch.crates-io.mycelium-alloc]
  git = "https://github.com/hawkw/mycelium"
  rev = "ba56bb4d02f46fb59754b7b88bddc2e8ca99c1f5"
  # Use the `mycelium-bitfield` crate from the Mycelium monorepo rather than
  # crates.io.
  # NOTE: this patch, unlike the patches for `maitake` and `mycelium-util`, (which
  # are unpublished), is not *strictly* necessary, as `mycelium-bitfield` *is*
  # published to crates.io. However, we may as well depend on the git version,
  # since it's already in our dependency tree as a transitive dep of `maitake` ---
  # having both a Git dep and a crates.io dep seems unfortunate.
  [patch.crates-io.mycelium-bitfield]
  git = "https://github.com/hawkw/mycelium"
  rev = "ba56bb4d02f46fb59754b7b88bddc2e8ca99c1f5"
  
  [patch.crates-io.mycelium-util]
  git = "https://github.com/hawkw/mycelium"
  rev = "ba56bb4d02f46fb59754b7b88bddc2e8ca99c1f5"
  
  [patch.crates-io.cordyceps]
  git = "https://github.com/hawkw/mycelium"
  rev = "ba56bb4d02f46fb59754b7b88bddc2e8ca99c1f5"
  
  [patch.crates-io.hal-core]
  git = "https://github.com/hawkw/mycelium"
  rev = "ba56bb4d02f46fb59754b7b88bddc2e8ca99c1f5"
  
  [patch.crates-io.hal-x86_64]
  git = "https://github.com/hawkw/mycelium"
  rev = "ba56bb4d02f46fb59754b7b88bddc2e8ca99c1f5"
  
  [patch.crates-io.bbq10kbd]
  git = "https://github.com/hawkw/bbq10kbd"
  branch = "eliza/async"
  
  # necessary to avoid `esp32c3-hal` depending on `log` with version `=0.4.18`,
  # which clashes with the `nextest` dependency of `log` `^0.4.19`. lol. lmao.
  [patch.crates-io.esp32c3-hal]
  git = "https://github.com/esp-rs/esp-hal"
  rev = "5a8be302b4049a6ebc17bd712d97c85a9fd83f76"
  
  [patch.crates-io.esp-hal-common]
  git = "https://github.com/esp-rs/esp-hal"
  rev = "5a8be302b4049a6ebc17bd712d97c85a9fd83f76"
  
  [patch.crates-io.esp-hal-procmacros]
  git = "https://github.com/esp-rs/esp-hal"
  rev = "5a8be302b4049a6ebc17bd712d97c85a9fd83f76"
  