| Crates.io | crossplane-fn-sdk-unofficial |
| lib.rs | crossplane-fn-sdk-unofficial |
| version | 0.5.0 |
| created_at | 2025-08-29 18:39:03.956158+00 |
| updated_at | 2025-11-16 11:45:27.126224+00 |
| description | A sdk to write Crossplane composite functions in Rust. Technically composite functions are basically gRPC server. |
| homepage | |
| repository | https://github.com/ngergs/crossplane-fn-sdk-rs-unofficial |
| max_upload_size | |
| id | 1816261 |
| size | 105,146 |
This is an unofficial Rust composite function sdk for crossplane.
The technical requirements follow from the official composite functions specification. Basically it sets up a gRPC-server that has to support CLI flags according to the specification as well as configuration environment variables (primarily for crossplane to inject the mTLS-configuration).
Add the sdk dependency:
cargo add crossplane-fn-sdk-unofficial
The most direct way to implement a composite function would be:
fn composite_function(request: RunFunctionRequest) -> Result<RunFunctionResponse,Status> {
// Business logic goes here
Ok(RunFunctionResponse {
context: request.context,
meta: Some(request.meta.into_response_meta(60)),
desired: request.desired,
..Default::default()
})
}
run_server(Args::parse(), composite_function).await?
For detailed information see the full API documentation.
Alternatively, the examples are a good way to get started.
prost-wkt-types used by the sdk.