Dagger
Search

rust

No long description provided.

Installation

dagger install github.com/sagikazarmark/jwk-simple/dagger/rust@9e11982bc684c49d7ad93899f0f2186366168a7d

Entrypoint

Return Type
Rust !
Arguments
NameTypeDefault ValueDescription
workspaceWorkspace -No description provided
workspacePathString -Path within the workspace boundary where the Rust project (or workspace) is located.
versionString -Version (image tag) to use from the official image repository as a base container.
containerContainer -Custom container to use as a base container.
targets[String ! ] -Default targets.
useCargoChefBoolean -Whether to use cargo-chef for dependency caching. Recommended for maximum cache efficiency. Note: requires curl or wget to be installed in the base container.
cargoChefVersionString -Version of cargo-chef to use.
noCacheBoolean -Whether to disable automatically mounted cache volumes. Useful if you want to mount cache volumes manually or use a different cache volume strategy.
cargoRegistryIndexCacheCacheVolume -Cache volume for cargo registry index.
cargoRegistryArchiveCacheCacheVolume -Cache volume for cargo registry archive.
cargoGitDbCacheCacheVolume -Cache volume for cargo git db.
cargoTargetCacheCacheVolume -Cache volume for cargo target.
Example
dagger -m github.com/sagikazarmark/jwk-simple/dagger/rust@9e11982bc684c49d7ad93899f0f2186366168a7d call \
func (m *MyModule) Example() *dagger.Rust  {
	return dag.
			Rust()
}
@function
def example() -> dagger.Rust:
	return (
		dag.rust()
	)
@func()
example(): Rust {
	return dag
		.rust()
}

Types

Rust 🔗

audit() 🔗

Runs cargo audit against Cargo.lock.

Return Type
Container !
Arguments
NameTypeDefault ValueDescription
workspaceWorkspace -No description provided
fileFile -Cargo.lock file to audit and use for dependency cache warming.
denyEnum -Exit with an error on any violation.
ignore[String ! ] -Advisory id to ignore (can be specified multiple times).
versionString -cargo-audit version to install.
dbDirectory -Directory containing the advisory database.
Example
echo 'Custom types are not supported in shell examples'
func (m *MyModule) Example() *dagger.Container  {
	return dag.
			Rust().
			Audit()
}
@function
def example() -> dagger.Container:
	return (
		dag.rust()
		.audit()
	)
@func()
example(): Container {
	return dag
		.rust()
		.audit()
}

build() 🔗

Run cargo build for each configured target.

Return Type
Void !
Arguments
NameTypeDefault ValueDescription
feature[String ! ] -Cargo features to enable, comma-separated.
targets[String ! ] -Override targets. Empty list inherits the globally configured `targets`.
Example
dagger -m github.com/sagikazarmark/jwk-simple/dagger/rust@9e11982bc684c49d7ad93899f0f2186366168a7d call \
 build
func (m *MyModule) Example(ctx context.Context)   {
	return dag.
			Rust().
			Build(ctx)
}
@function
async def example() -> None:
	return await (
		dag.rust()
		.build()
	)
@func()
async example(): Promise<void> {
	return dag
		.rust()
		.build()
}

clippy() 🔗

Runs cargo clippy --all-targets -- -D warnings for each configured target.

Return Type
Void !
Arguments
NameTypeDefault ValueDescription
feature[String ! ] -Cargo features to enable, comma-separated.
targets[String ! ] -Override targets. Empty list inherits the globally configured `targets`.
Example
dagger -m github.com/sagikazarmark/jwk-simple/dagger/rust@9e11982bc684c49d7ad93899f0f2186366168a7d call \
 clippy
func (m *MyModule) Example(ctx context.Context)   {
	return dag.
			Rust().
			Clippy(ctx)
}
@function
async def example() -> None:
	return await (
		dag.rust()
		.clippy()
	)
@func()
async example(): Promise<void> {
	return dag
		.rust()
		.clippy()
}

fmt() 🔗

Checks Rust source formatting with cargo fmt --check.

Return Type
String !
Example
dagger -m github.com/sagikazarmark/jwk-simple/dagger/rust@9e11982bc684c49d7ad93899f0f2186366168a7d call \
 fmt
func (m *MyModule) Example(ctx context.Context) string  {
	return dag.
			Rust().
			Fmt(ctx)
}
@function
async def example() -> str:
	return await (
		dag.rust()
		.fmt()
	)
@func()
async example(): Promise<string> {
	return dag
		.rust()
		.fmt()
}

doc() 🔗

Builds rustdoc and treats warnings as errors.

Return Type
String !
Arguments
NameTypeDefault ValueDescription
feature[String ! ] -Cargo features to enable, comma-separated.
Example
dagger -m github.com/sagikazarmark/jwk-simple/dagger/rust@9e11982bc684c49d7ad93899f0f2186366168a7d call \
 doc
func (m *MyModule) Example(ctx context.Context) string  {
	return dag.
			Rust().
			Doc(ctx)
}
@function
async def example() -> str:
	return await (
		dag.rust()
		.doc()
	)
@func()
async example(): Promise<string> {
	return dag
		.rust()
		.doc()
}

test() 🔗

Run cargo test for each configured target.

Return Type
Void !
Arguments
NameTypeDefault ValueDescription
feature[String ! ] -Cargo features to enable, comma-separated.
targets[String ! ] -Override targets. Empty list inherits the globally configured `targets`.
Example
dagger -m github.com/sagikazarmark/jwk-simple/dagger/rust@9e11982bc684c49d7ad93899f0f2186366168a7d call \
 test
func (m *MyModule) Example(ctx context.Context)   {
	return dag.
			Rust().
			Test(ctx)
}
@function
async def example() -> None:
	return await (
		dag.rust()
		.test()
	)
@func()
async example(): Promise<void> {
	return dag
		.rust()
		.test()
}

fix() 🔗

Runs a fixer and returns a changeset that can be inspected or applied.

Return Type
Changeset !
Arguments
NameTypeDefault ValueDescription
toolString -Tool to run: clippy.
features[String ! ] -Cargo features to enable when running the fixer.
Example
dagger -m github.com/sagikazarmark/jwk-simple/dagger/rust@9e11982bc684c49d7ad93899f0f2186366168a7d call \
 fix
func (m *MyModule) Example() *dagger.Changeset  {
	return dag.
			Rust().
			Fix()
}
@function
def example() -> dagger.Changeset:
	return (
		dag.rust()
		.fix()
	)
@func()
example(): Changeset {
	return dag
		.rust()
		.fix()
}