Write a guide "How to write small and fast Miden contracts in Rust"
- Lingua principale
- Rust
- Stelle
- 115
- Fork
- 84
- Merge medio
- 1g 8h
- PR unite (30g)
- 15
Descrizione
@mooori mentioned that this topic came up in discussions.
I'm thinking:
1. Avoid memory allocation.
2. Avoid unaligned memory access (avoid small ints like i8 and i16).
3. Avoid `Vec` and probably other high-level container types. Use arrays.
Felt arithmetic should have near-zero overhead but we want to discourage it (see #999) so I guess we should not promote it here either.
@bitwalker Thoughts?
/cc @bobbinth @Keinberger
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Look at existing Miden contracts in the repository to understand the current patterns and performance considerations. Review issue #999 for context on felt arithmetic. The guide should explain how to structure Rust code for the Miden compiler, focusing on memory allocation, data types, and container choices. Test the advice by compiling a small example contract and verifying the generated Miden Assembly.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- rust
- Ambito
- documentation
- Tipo di issue
- Documentazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Attiva
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 55/100