How solarmoff-afk/firework works
Firework is a Rust UI framework with a procedural compiler, runtime widgets and layout, adapter interfaces, and developer tooling. The principal workflow is Rust UI input through AST normalization, analysis, lowering and code generation, then generated UI behavior through runtime widgets and an adapter. The README provides no capability overview; the graph relies on the sampled compiler/runtime excerpts and SOURCE INDEX. Several modules are indexed but not sampled, so their internal calls and some integration links are omitted.
Main entry points: lib.rs Runtime API · compiler/mod.rs Compiler entry · code_builder/mod.rs Code builder · std_widgets/mod.rs Standard widgets
Components 22
UI compiler
- Compiler entry
crates/firework_compiler/src/compiler/mod.rs - AST normalization
crates/firework_compiler/src/compiler/desugaring/mod.rs - Semantic analysis
crates/firework_compiler/src/compiler/analyze - AST lowering
crates/firework_compiler/src/compiler/codegen/lower - Code transforms
crates/firework_compiler/src/compiler/codegen/transform - Compiler IR
crates/firework_compiler/src/compiler/codegen/ir - Code builder
crates/firework_compiler/src/compiler/codegen/code_builder/mod.rs - Layout generation
crates/firework_compiler/src/compiler/codegen/code_builder/layout/arrage_gen.rs - Static generation
crates/firework_compiler/src/compiler/codegen/generator/static_gen.rs - Bitmask generation
crates/firework_compiler/src/compiler/codegen/generator/bitmask_gen.rs
UI runtime
- Runtime API
firework/src/lib.rs - Layout engine
firework/src/layout.rs - Widget contract
firework/src/std_widgets/widget.rs - Standard widgets
firework/src/std_widgets/mod.rs - Dynamic lists
firework/src/runtime/dyn_list.rs - Async sparks
firework/src/runtime/async_spark.rs
Rendering adapters
- Adapter interface
crates/firework_adapter/src/lib.rs - Null adapter
firework/src/null_adapter.rs
Developer tools
- Visual devtool
crates/firework_devtools/src/visual_dt.rs - Android render client
crates/firework_dev/client/src/main/java/com/firework/devclient/RenderView.java - Development library
crates/firework_dev/src/lib.rs
Other components
- Rust UI author
Connections 24
- Rust UI author → Compiler entry: provides AST
crates/firework_compiler/src/compiler/mod.rs - Compiler entry → AST normalization: normalizes AST
crates/firework_compiler/src/compiler/mod.rs - Compiler entry → Semantic analysis: analyzes tokens
crates/firework_compiler/src/compiler/mod.rs - Compiler entry → AST lowering: lowers AST
crates/firework_compiler/src/compiler/mod.rs - Compiler entry → Code transforms: transforms AST
crates/firework_compiler/src/compiler/mod.rs - Compiler entry → Compiler IR: passes IR
crates/firework_compiler/src/compiler/mod.rs - Code builder → Compiler IR: reads IR
crates/firework_compiler/src/compiler/codegen/code_builder/mod.rs - Layout generation → Compiler IR: reads widget data
crates/firework_compiler/src/compiler/codegen/code_builder/layout/arrage_gen.rs - Code builder → Layout generation: delegates layout
crates/firework_compiler/src/compiler/codegen/code_builder/mod.rs - Code builder → Static generation: invokes generator
crates/firework_compiler/src/compiler/codegen/code_builder/mod.rs - Code builder → Bitmask generation: invokes generator
crates/firework_compiler/src/compiler/codegen/code_builder/mod.rs - Runtime API → Layout engine: exports module
firework/src/lib.rs - Runtime API → Standard widgets: exports module
firework/src/lib.rs - Runtime API → Async sparks: exports runtime
- Runtime API → Dynamic lists: exports runtime
- Standard widgets → Widget contract: implements contract
firework/src/std_widgets/widget.rs - Standard widgets → Layout engine: uses layout types
firework/src/std_widgets/mod.rs - Dynamic lists → Widget contract: manages widgets
firework/src/runtime/dyn_list.rs - Dynamic lists → Layout engine: uses layout types
firework/src/runtime/dyn_list.rs - Runtime API → Adapter interface: dispatches commands
- Runtime API → Null adapter: provides fallback
firework/src/lib.rs - Visual devtool → Adapter interface: proxies commands
crates/firework_devtools/src/visual_dt.rs - Development library → Visual devtool: exposes tooling
- Android render client → Development library: integrates with