-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Milestone
Description
Task 2 — Implement Minimal build.rs Loader
Objective
Read and parse flowd.build.toml inside build.rs.
Requirements
-
Add
build.rsto project root. -
Use
tomlcrate to parse file. -
Validate:
- At least one component exists.
- No duplicate
name. crateandstructfields are not empty.
-
If validation fails →
panic!().
Acceptance Criteria
cargo buildfails if config invalid.cargo buildsucceeds if valid.
No code generation yet.
Task 3 — Generate build_generated.rs
Objective
Generate Rust code during build.
Requirements
In build.rs:
-
Create file:
$OUT_DIR/build_generated.rs -
Generate:
3.1 Use Statements
use repeat_component::RepeatComponent;
use drop_component::DropComponent;Based on config.
3.2 Metadata Registration Function
pub fn build_component_library() -> Arc<RwLock<ComponentLibrary>> {
Arc::new(RwLock::new(ComponentLibrary::new(vec![
RepeatComponent::get_metadata(),
DropComponent::get_metadata(),
])))
}Acceptance Criteria
- Generated file compiles.
- Removing a component from config removes it from metadata.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels