0xMiden / 0xMiden/compiler

cargo-miden 0.8.1 fails to install on all toolchains + cross-component WIT circular dependency + version compatibility table request

Aperta
#1,127 1 commento 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Rust
Stelle
115
Fork
84
Merge medio
1g 8h
PR unite (30g)
15

Descrizione

### Packages versions

cargo-miden: 0.8.1 (fails to install)
miden-client: 0.14.7
rustc nightly: 1.92.0-nightly (nightly-2025-09-30)
rustc stable: 1.87.0
OS: Linux WSL2 (Windows 11)

### Bug description

We are building GhostMate, an agent chess game
on Miden (ghostmate.vercel.app).
Redirected here by @SantiagoPittella from
0xMiden/miden-client#2168.

PROBLEM 1 cargo-miden 0.8.1 fails on every toolchain

On nightly-2025-09-30 (rustc 1.92.0-nightly):
cargo +nightly install cargo-miden --locked fails with:
"cannot specialize on trait Copy" in hashbrown-0.15.5

On stable rustc 1.87.0:
cargo +stable install cargo-miden --locked fails with:
"#![feature] may not be used on stable release channel"

cargo miden --version returns "no such command: miden"
on every toolchain tried.

The root cause appears to be that cargo-miden 0.8.1
lockfile pins hashbrown 0.15.5 which uses the
specialization nightly feature currently broken
on nightly-2025-09-30 and not allowed on stable.

There is no documented pinned nightly that
cargo-miden 0.8.1 is known to build on, and no
rust-toolchain.toml ships with it.

Q: What is the exact install command and toolchain
version that produces a working cargo miden binary today?

---

PROBLEM 4 Cross-component WIT circular dependency

Our note scripts call functions on account contracts
via cross-component WIT bindings:

move-note cannot be built until game-contract WIT
is generated (game-contract must be built first).
But game-contract embeds move-note MAST root as a
compile-time constant only known after move-note
is built.

This is a genuine circular dependency with no
documented resolution pattern.

Q: Is there an official pattern for breaking this
circular dependency? For example:
- Can cargo miden build --all resolve dependency
order automatically?
- Can note scripts call account components without
embedding a WIT path?
- Can MAST roots be read from build artifacts at
deploy time instead of compile-time constants?

COMPATIBILITY TABLE REQUEST

There is no published compatibility matrix between:
- miden SDK version
- miden-client version
- cargo-miden version
- Required Rust toolchain

Q: Can a version compatibility table be added
to the docs showing which versions work together?

Example of what would help:
miden-client 0.14.x → stable Rust 1.93+
cargo-miden 0.8.1 → ??? (currently uninstallable)
miden SDK 0.12 → compatible with client 0.14?
testnet → v0.14

### How can this be reproduced?

# Problem 1 cargo-miden uninstallable on nightly
rustup toolchain install nightly-2025-09-30
cargo +nightly install cargo-miden --locked
# fails: hashbrown specialization error

# Problem 1 cargo-miden uninstallable on stable
cargo +stable install cargo-miden --locked
# fails: #![feature] on stable channel

# Verify no working binary exists
cargo miden --version
# returns: error: no such command: miden

# Problem 4 cross-component WIT
git clone https://github.com/AQEELERRHH/ghostmate
cd ghostmate/contracts/move-note
cargo build
# fails: game-contract/target/generated-wit missing

### Relevant log output

```shell
# Problem 1 nightly
error: cannot specialize on trait `Copy`
--> hashbrown-0.15.5/src/raw/mod.rs:3269:9
|
3269 | impl RawTableClone for RawTable {
| ^^^^
error: could not compile `hashbrown` (lib)
error: failed to compile `cargo-miden v0.8.1`

# Problem 1 stable
error[E0554]: `#![feature]` may not be used on
the stable release channel
--> hashbrown-0.15.5/src/lib.rs:15:5
error: cannot specialize on trait `Copy`
error: failed to compile `cargo-miden v0.8.1`

# Problem 4 cross-component WIT
error: failed to process WIT for dependency
'miden:game-contract': no WIT world definition
found in directories
'[ghostmate/contracts/game-contract/target/generated-wit]'

error[E0433]: failed to resolve: could not find
`bindings` in the crate root
--> src/lib.rs:17:12
|
17 | use crate::bindings::miden::game_contract::game_contract;
| ^^^^^^^^ could not find `bindings` in crate root
```

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

L'issue descrive tre problemi: errori di installazione di cargo-miden a causa della dipendenza hashbrown, una dipendenza circolare nei binding WIT per le chiamate tra componenti e una richiesta per una tabella di compatibilità delle versioni. Iniziare esaminando il Cargo.toml e il file di blocco della crate cargo-miden per comprendere il pin di hashbrown. Per la dipendenza circolare WIT, esaminare gli script di build e le directory WIT generate nel repository ghostmate. 'Fatto' significa identificare l'esatto toolchain che funziona, proporre una correzione per la build circolare e redigere una matrice di compatibilità per la documentazione.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
rust
Ambito
build-system, documentation, tooling
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Specificata chiaramente
Idoneità per principianti
30/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.