Skip to content

Cargo

Build Rust projects with Cargo.

Features

  • Supports private Crate registries by injecting Basic-auth credentials using a HTTPS proxy.

Quickstart

# ::requirements kraken-std

from kraken.std.cargo import *

cargo_registry( 
    "artifactory",
    "https://example.jfrog.io/artifactory/git/test-cargo.git",
    publish_token=f"Bearer <TOKEN>",
    read_credentials=("me@example.org", "<TOKEN>"),
)
cargo_auth_proxy()
cargo_sync_config()
cargo_login()
cargo_build("debug")
cargo_build("release")
cargo_publish("artifactory")

Integration tests

The cargo_publish() and cargo_build() tasks are continuously integration tested against JFrog Artifactory and Cloudsmith.

Build graph

Environment variables

  • PROXY_PY_TIMEOUT
  • KRAKEN_CARGO_BUILD_FLAGS