Skip to content

ZK Rust Language Features

This table tracks feature availability, including feature comparison with the main Rust project, and some ZkRust specific features mixed in. This is not a roadmap.

Legend: ✅ Supported, ✨ Supported and distinct from Rust, ❌ Unsupported

FeatureStatusLikelyhood of implementation
For-in-range
Public Integers and booleans
SbiN (Secret Binary Integers)
Structs with public
Structs with secret
Tuple Types
Type generics
continue, break
Type aliases
Generalized for-in-iterator
Assigning to struct fields
fn Function declaration
Arrays
General derive traitsLikely
enumLikely
const Constant itemsPossibly
Closure expressionsPossibly
Constant genericsPossibly
Constant evaluationPossibly
Full iterator interfacePossibly
Function references and typesPossibly
Pattern matching and DestructuringPossibly
String TypePossibly
Compound assignment expressionsPossibly
Question mark operatorPossibly
matchPossibly
unionPossibly
f32, f64 FloatsUnlikely
Associated itemsUnlikely
extern crateUnlikely
Full borrow checkingUnlikely
General macro supportUnlikely
Generic Associated TypesUnlikely
ModulesUnlikely
Trait and implUnlikely
dyn Trait objectsUnlikely
panic!Unlikely
LifetimesUnlikely, due to limited utility
References and PointersUnlikely, due to limited utility
loopUnlikely, due to gas concerns.
whileUnlikely, due to gas concerns.
Bitshift with two secretsUnlikely, due to performance concerns.
Array indexing with secret-shared indexUnlikely, due to performance concerns.
AsyncIncompatible with current archtecture.
Inline AssemblyIncompatible with current archtecture.
Operating System AccessIncompatible with current archtecture.
print! and other IOIncompatible with current archtecture.
ThreadingIncompatible with current archtecture.
unsafeIncompatible with current archtecture.