Repository navigation
A workflow's input is its configuration: derive(Config), Layers, Program - #53
Merged
Merged
Conversation
…, Program) #[derive(Config)] gives a workflow's input type command line flags, config::Layers reads it from defaults, files, the environment and flags, and runner::Program is main for a workflow. The README, docs and examples use the pattern. Version 0.2.4. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
2C3C
Summary
#[derive(Config)](featureconfig) gives a workflow's input type one flag per field, with doc comments as help.Option<T>,Vec<T>,boolswitches,#[config(skip|short|long)],#[serde(rename)]are understood.jackdaw::config::Layersreads any serde type from defaults, files (toml/json/yaml), environment variables (__for nesting) and flags, later sources winning. Errors name the setting or file.jackdaw::runner::Program(featurecli) ismainfor a workflow: reads the input, runs it with aRunner, prints JSON. Flags:--config,--run-id,--quiet,--json,--plain,--restart.Program::run(args, vars)is the testable form.guide::configchapter and all examples use the config-struct pattern.Notes
--run-idis not--idto avoid clashing with common field names.operations/config.feature. Clippy, doctests and wasm clippy (config,yaml,config) pass locally.🤖 Generated with Claude Code