docs(cli): add a Rust tab to the projects get-started guide - #1156
Draft
jonasz-lasut wants to merge 1 commit into
Draft
jonasz-lasut wants to merge 1 commit into
jonasz-lasut wants to merge 1 commit into
Conversation
✅ Deploy Preview for crossplane ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
jonasz-lasut
force-pushed
the
rust-tab
branch
from
September 17, 2026 10:05
e8f670d to
9279a59
Compare
Document writing the get-started composition function in Rust, next to the Templated YAML, Python, Go and KCL tabs. The example builds the Deployment and the Service from the models the CLI generates into the crossplane-models crate, and renders to the output the page already shows. Note that render needs a longer timeout with a Rust function: the CLI compiles the function and its dependencies from source on every render, which overruns the default of one minute. Add crates.io to the Vale brand list so the page lints clean. Signed-off-by: Jonasz Łasut-Balcerzak <jonasz@upbound.io>
jonasz-lasut
force-pushed
the
rust-tab
branch
from
September 17, 2026 10:19
9279a59 to
6a0a5e7
Compare
14 tasks
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.

Document writing composition functions in Rust alongside the existing Templated YAML, Python, Go and KCL tabs. The tab follows the Go one and covers the parts that differ:
crossplane-modelscrate the CLI generates intoschemas/rust, Kubernetes built-ins included, soDeploymentandServiceare imported from it. The scaffolded function depends on the crate by path.crossplane_models::com::example::platform::v1alpha1::WebApp.Optionthat is left out when unset, andDefaultfills in a resource'sapiVersionandkind. That is why the example ends each struct with..Default::default().The example renders to exactly the output the page already shows under "Render the composition". I checked that by running the guide's steps with a CLI built from the Rust support branch and comparing the rendered YAML with the page's.
Also note the render timeout.
composition renderdefaults to 1m, and the CLI compiles a Rust function and its dependencies from source on every render, which overruns it and fails with "context deadline exceeded".Add
crates.ioto the Vale brand list so the content lints clean.Depends on crossplane/cli#374