Skip to content

Extend Rust cli gen, multi module support#88

Merged
dgunzy merged 1 commit into
mainfrom
extend-rust-cli
Apr 28, 2026
Merged

Extend Rust cli gen, multi module support#88
dgunzy merged 1 commit into
mainfrom
extend-rust-cli

Conversation

@dgunzy

@dgunzy dgunzy commented Mar 21, 2026

Copy link
Copy Markdown
Contributor

Signed-off-by: Daniel Guns danbguns@gmail.com

This PR expands Firestone’s Rust CLI generation for multi-source, modular workflows.

It adds per-resource client_pkg, namespace, singular, and cross-crate model_pkg_overrides support so resources from different OpenAPI
sources can be combined into a single generated CLI without naming or model-resolution conflicts.

It also updates the Rust templates so each generated resource module is self-contained, initializes its own client configuration, and can be
wired into a hand-rolled main.rs. For modular Rust generation (cli --language rust --as-modules), Firestone now also emits a helper
Cargo.toml that includes the required client-crate dependencies.

Along the way, this improves generated Rust type handling and enum naming, and adds test coverage for multi-source generation, module-name
collision detection, Cargo dependency generation, and cross-crate model references.

The primary focus of this PR is Rust modular CLI generation. The goal is to make multi-project, multi-client Rust CLIs easier to compose,
safer to extend, and clearer to integrate into custom binaries.

@dgunzy dgunzy marked this pull request as draft March 21, 2026 16:20
Comment thread firestone/__main__.py Outdated
@dgunzy dgunzy force-pushed the extend-rust-cli branch 4 times, most recently from 7fcc665 to a3b1fb9 Compare April 1, 2026 16:34
@dgunzy dgunzy marked this pull request as ready for review April 2, 2026 11:09
@dgunzy dgunzy requested a review from ebourgeois April 2, 2026 11:09
@dgunzy dgunzy force-pushed the extend-rust-cli branch 4 times, most recently from 3504b17 to c76714a Compare April 20, 2026 12:46
Signed-off-by: Daniel Guns <danbguns@gmail.com>
@dgunzy dgunzy merged commit db6e19f into main Apr 28, 2026
7 checks passed
@dgunzy dgunzy deleted the extend-rust-cli branch April 28, 2026 12:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants