Files
lez-programs/Cargo.toml
T
r4bbit f5ff9b829f refactor(apps/amm): move the amm_client crate into modules/amm/ffi as amm_ffi
After the amm_module refactor, this crate is linked only by the module (the
UI delegates to modules().amm_module and links nothing), so its home under
apps/amm/ and the name "client" were both misnomers: it's the AMM business
logic the module wraps, reached across an FFI boundary — the same relationship
logos_execution_zone has with wallet_ffi. Co-locate it with the module that
owns it and name it for that role.

The FFI surface is unchanged — the exported functions are already amm_* (not
amm_client_*) — so only the crate, directory, generated header, dylib, and
package names move. The module's call sites are untouched; it just includes the
renamed header.

- apps/amm/client → modules/amm/ffi (git-tracked rename; history preserved)
- crate amm_client → amm_ffi: package name, include/amm_ffi.h, libamm_ffi.dylib,
  AMM_FFI_H guard, build.rs output path, tests/public_api.rs import
- workspace member path + Cargo.lock
- flake.nix: pname, -p, header-copy path, dylib install_name, packages.amm_ffi,
  ammModuleOutputs externalLibInputs, DYLD wrapper
- modules/amm: metadata external_libraries, CMakeLists EXTERNAL_LIBS, impl
  #include + comments, README, flake note
- apps/amm/flake.nix: drop the now-dead amm_client external-lib input (the UI
  links no external lib of its own)

Resulting layout:
  modules/amm/
    src/   # C++ module  (amm_module_impl.{h,cpp})
    ffi/   # Rust crate  amm_ffi  (Cargo.toml, src/, include/amm_ffi.h)
2026-08-03 23:11:06 +02:00

95 lines
3.2 KiB
TOML

[workspace]
members = [
"modules/amm/ffi",
"programs/token/core",
"programs/token",
"programs/token/methods",
"programs/amm/core",
"programs/amm",
"programs/amm/methods",
"programs/ata/core",
"programs/ata",
"programs/ata/methods",
"programs/twap_oracle/core",
"programs/twap_oracle",
"programs/twap_oracle/methods",
"programs/stablecoin/core",
"programs/stablecoin",
"programs/stablecoin/methods",
"programs/integration_tests",
"tools/idl-gen",
"tools/risc0-packager",
]
exclude = [
"programs/token/methods/guest",
"programs/amm/methods/guest",
"programs/ata/methods/guest",
"programs/stablecoin/methods/guest",
"programs/twap_oracle/methods/guest",
# Cycle benchmarks: standalone crate, kept out of --workspace builds/tests/CI. Run on demand
# with `cargo test --manifest-path programs/benchmark/Cargo.toml -- --ignored --nocapture`.
"programs/benchmark"
]
resolver = "2"
[workspace.dependencies]
nssa_core = { git = "https://github.com/logos-blockchain/logos-execution-zone.git", tag = "v0.2.0", features = ["host"], package = "lee_core" }
nssa = { git = "https://github.com/logos-blockchain/logos-execution-zone.git", tag = "v0.2.0", features = ["test-utils"], package = "lee" }
token_core = { path = "programs/token/core" }
token_program = { path = "programs/token" }
amm_core = { path = "programs/amm/core" }
amm_program = { path = "programs/amm" }
ata_core = { path = "programs/ata/core" }
ata_program = { path = "programs/ata" }
twap_oracle_core = { path = "programs/twap_oracle/core" }
twap_oracle_program = { path = "programs/twap_oracle" }
stablecoin_core = { path = "programs/stablecoin/core" }
stablecoin_program = { path = "programs/stablecoin" }
serde = { version = "1.0", features = ["derive"] }
borsh = { version = "1.5", features = ["derive"] }
risc0-zkvm = { version = "=3.0.5" }
serde_json = "1.0"
tokio = { version = "1.28.2", features = ["net", "rt-multi-thread", "sync", "macros"] }
[workspace.lints.rust]
rust_2018_idioms = { level = "deny", priority = -1 }
# deny (not forbid) so a targeted per-item #[allow] remains possible if ever needed
unsafe_code = "deny"
[workspace.lints.clippy]
# Deny only the groups where a new lint should always be a hard error.
# style/pedantic lints default to warn so toolchain upgrades don't break the
# build unexpectedly — they can be evaluated and addressed at our own pace.
correctness = { level = "deny", priority = -1 }
suspicious = { level = "deny", priority = -1 }
perf = { level = "deny", priority = -1 }
style = { level = "warn", priority = -1 }
# Generated-code / placeholder blockers.
dbg_macro = "deny"
todo = "deny"
unimplemented = "deny"
unwrap_used = "deny"
# Lint suppression hygiene.
allow_attributes = "warn"
allow_attributes_without_reason = "deny"
# Determinism, panic-safety, and arithmetic correctness.
arithmetic_side_effects = "deny"
indexing_slicing = "deny"
# Cast discipline.
as_conversions = "deny"
cast_possible_truncation = "deny"
cast_possible_wrap = "deny"
cast_sign_loss = "deny"
# API and enum evolution.
large_enum_variant = "deny"
wildcard_enum_match_arm = "deny"
# Too noisy for this codebase unless enforced selectively.
module_name_repetitions = "allow"
similar_names = "allow"