rust
No long description provided.
Installation
dagger install github.com/sagikazarmark/jwk-simple/dagger/rust@d5f05bc505f2e17e672591276b9c0b381f19759bEntrypoint
Return Type
Rust !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| workspace | Workspace | - | No description provided |
| workspacePath | String | - | Path within the workspace boundary where the Rust project (or workspace) is located. |
| version | String | - | Version (image tag) to use from the official image repository as a base container. |
| container | Container | - | Custom container to use as a base container. |
| targets | [String ! ] | - | Default targets. |
| useCargoChef | Boolean | - | 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. |
| cargoChefVersion | String | - | Version of cargo-chef to use. |
| noCache | Boolean | - | Whether to disable automatically mounted cache volumes. Useful if you want to mount cache volumes manually or use a different cache volume strategy. |
| cargoRegistryIndexCache | CacheVolume | - | Cache volume for cargo registry index. |
| cargoRegistryArchiveCache | CacheVolume | - | Cache volume for cargo registry archive. |
| cargoGitDbCache | CacheVolume | - | Cache volume for cargo git db. |
| cargoTargetCache | CacheVolume | - | Cache volume for cargo target. |
Example
dagger -m github.com/sagikazarmark/jwk-simple/dagger/rust@d5f05bc505f2e17e672591276b9c0b381f19759b 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 🔗
test() 🔗
Run cargo test for each configured target.
Return Type
Void !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| 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@d5f05bc505f2e17e672591276b9c0b381f19759b call \
testfunc (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()
}build() 🔗
Run cargo build for each configured target.
Return Type
Void !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| 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@d5f05bc505f2e17e672591276b9c0b381f19759b call \
buildfunc (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()
}fmt() 🔗
Checks Rust source formatting with cargo fmt --check.
Return Type
String ! Example
dagger -m github.com/sagikazarmark/jwk-simple/dagger/rust@d5f05bc505f2e17e672591276b9c0b381f19759b call \
fmtfunc (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()
}clippy() 🔗
Runs cargo clippy --all-targets -- -D warnings for each configured target.
Return Type
Void !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| 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@d5f05bc505f2e17e672591276b9c0b381f19759b call \
clippyfunc (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()
}doc() 🔗
Builds rustdoc and treats warnings as errors.
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| feature | [String ! ] | - | Cargo features to enable, comma-separated. |
Example
dagger -m github.com/sagikazarmark/jwk-simple/dagger/rust@d5f05bc505f2e17e672591276b9c0b381f19759b call \
docfunc (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()
}fix() 🔗
Runs a fixer and returns a changeset that can be inspected or applied.
Return Type
Changeset !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| tool | String | - | Tool to run: clippy. |
| features | [String ! ] | - | Cargo features to enable when running the fixer. |
Example
dagger -m github.com/sagikazarmark/jwk-simple/dagger/rust@d5f05bc505f2e17e672591276b9c0b381f19759b call \
fixfunc (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()
}audit() 🔗
Runs cargo audit against Cargo.lock.
Return Type
Container !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| workspace | Workspace | - | No description provided |
| file | File | - | Cargo.lock file to audit and use for dependency cache warming. |
| deny | Enum | - | Exit with an error on any violation. |
| ignore | [String ! ] | - | Advisory id to ignore (can be specified multiple times). |
| version | String | - | cargo-audit version to install. |
| db | Directory | - | 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()
}