crossplane-fn-sdk-unofficial

Crates.iocrossplane-fn-sdk-unofficial
lib.rscrossplane-fn-sdk-unofficial
version0.5.0
created_at2025-08-29 18:39:03.956158+00
updated_at2025-11-16 11:45:27.126224+00
descriptionA sdk to write Crossplane composite functions in Rust. Technically composite functions are basically gRPC server.
homepage
repositoryhttps://github.com/ngergs/crossplane-fn-sdk-rs-unofficial
max_upload_size
id1816261
size105,146
Niklas Gergs (ngergs)

documentation

README

crossplane-fn-sdk-unofficial

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).

Usage

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?

Docs

For detailed information see the full API documentation.

Alternatively, the examples are a good way to get started.

Compile-time dependencies

  • protoc for the protocol buffer library prost-wkt-types used by the sdk.
Commit count: 188

cargo fmt