rust-sdk-dev
Toolchain to develop the Dagger Rust SDK (experimental)
Installation
dagger install github.com/shykes/dagger/toolchains/rust-sdk-dev@7ec44c64b509793d2a722ebdfef94a77dbcdcefeEntrypoint
Return Type
RustSdkDev !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| workspace | Directory | - | A directory with all the files needed to develop the SDK |
| sourcePath | String ! | "sdk/rust" | The path of the SDK source in the workspace |
Example
dagger -m github.com/shykes/dagger/toolchains/rust-sdk-dev@7ec44c64b509793d2a722ebdfef94a77dbcdcefe call \
--source-path stringfunc (m *MyModule) Example(sourcePath string) *dagger.RustSdkDev {
return dag.
RustSdkDev(sourcePath)
}@function
def example(source_path: str) -> dagger.RustSdkDev:
return (
dag.rust_sdk_dev(source_path)
)@func()
example(sourcePath: string): RustSdkDev {
return dag
.rustSdkDev(sourcePath)
}Types
RustSdkDev 🔗
Develop the Dagger Rust SDK (experimental)
baseContainer() 🔗
Return Type
Container ! Example
dagger -m github.com/shykes/dagger/toolchains/rust-sdk-dev@7ec44c64b509793d2a722ebdfef94a77dbcdcefe call \
--source-path string base-containerfunc (m *MyModule) Example(sourcePath string) *dagger.Container {
return dag.
RustSdkDev(sourcePath).
BaseContainer()
}@function
def example(source_path: str) -> dagger.Container:
return (
dag.rust_sdk_dev(source_path)
.base_container()
)@func()
example(sourcePath: string): Container {
return dag
.rustSdkDev(sourcePath)
.baseContainer()
}devContainer() 🔗
Return the Rust SDK workspace mounted in a dev container, and working directory set to the SDK source.
Return Type
Container !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| runInstall | Boolean ! | "false" | Install workspace dependencies and any tools required to develop the Rust SDK. |
Example
dagger -m github.com/shykes/dagger/toolchains/rust-sdk-dev@7ec44c64b509793d2a722ebdfef94a77dbcdcefe call \
--source-path string dev-container --run-install booleanfunc (m *MyModule) Example(sourcePath string, runInstall bool) *dagger.Container {
return dag.
RustSdkDev(sourcePath).
DevContainer(runInstall)
}@function
def example(source_path: str, run_install: bool) -> dagger.Container:
return (
dag.rust_sdk_dev(source_path)
.dev_container(run_install)
)@func()
example(sourcePath: string, runInstall: boolean): Container {
return dag
.rustSdkDev(sourcePath)
.devContainer(runInstall)
}source() 🔗
Source returns the source directory for the Rust SDK.
Return Type
Directory ! Example
dagger -m github.com/shykes/dagger/toolchains/rust-sdk-dev@7ec44c64b509793d2a722ebdfef94a77dbcdcefe call \
--source-path string sourcefunc (m *MyModule) Example(sourcePath string) *dagger.Directory {
return dag.
RustSdkDev(sourcePath).
Source()
}@function
def example(source_path: str) -> dagger.Directory:
return (
dag.rust_sdk_dev(source_path)
.source()
)@func()
example(sourcePath: string): Directory {
return dag
.rustSdkDev(sourcePath)
.source()
}cargoFmt() 🔗
Run cargo fmt on the Rust SDK
Return Type
Void ! Example
dagger -m github.com/shykes/dagger/toolchains/rust-sdk-dev@7ec44c64b509793d2a722ebdfef94a77dbcdcefe call \
--source-path string cargo-fmtfunc (m *MyModule) Example(ctx context.Context, sourcePath string) {
return dag.
RustSdkDev(sourcePath).
CargoFmt(ctx)
}@function
async def example(source_path: str) -> None:
return await (
dag.rust_sdk_dev(source_path)
.cargo_fmt()
)@func()
async example(sourcePath: string): Promise<void> {
return dag
.rustSdkDev(sourcePath)
.cargoFmt()
}cargoCheck() 🔗
Run cargo check on the Rust SDK
Return Type
Void ! Example
dagger -m github.com/shykes/dagger/toolchains/rust-sdk-dev@7ec44c64b509793d2a722ebdfef94a77dbcdcefe call \
--source-path string cargo-checkfunc (m *MyModule) Example(ctx context.Context, sourcePath string) {
return dag.
RustSdkDev(sourcePath).
CargoCheck(ctx)
}@function
async def example(source_path: str) -> None:
return await (
dag.rust_sdk_dev(source_path)
.cargo_check()
)@func()
async example(sourcePath: string): Promise<void> {
return dag
.rustSdkDev(sourcePath)
.cargoCheck()
}test() 🔗
Test the Rust SDK
Return Type
Void ! Example
dagger -m github.com/shykes/dagger/toolchains/rust-sdk-dev@7ec44c64b509793d2a722ebdfef94a77dbcdcefe call \
--source-path string testfunc (m *MyModule) Example(ctx context.Context, sourcePath string) {
return dag.
RustSdkDev(sourcePath).
Test(ctx)
}@function
async def example(source_path: str) -> None:
return await (
dag.rust_sdk_dev(source_path)
.test()
)@func()
async example(sourcePath: string): Promise<void> {
return dag
.rustSdkDev(sourcePath)
.test()
}generate() 🔗
Regenerate the Rust SDK API client.
Return Type
Changeset ! Example
dagger -m github.com/shykes/dagger/toolchains/rust-sdk-dev@7ec44c64b509793d2a722ebdfef94a77dbcdcefe call \
--source-path string generatefunc (m *MyModule) Example(sourcePath string) *dagger.Changeset {
return dag.
RustSdkDev(sourcePath).
Generate()
}@function
def example(source_path: str) -> dagger.Changeset:
return (
dag.rust_sdk_dev(source_path)
.generate()
)@func()
example(sourcePath: string): Changeset {
return dag
.rustSdkDev(sourcePath)
.generate()
}changes() 🔗
Return Type
Changeset ! Example
dagger -m github.com/shykes/dagger/toolchains/rust-sdk-dev@7ec44c64b509793d2a722ebdfef94a77dbcdcefe call \
--source-path string changesfunc (m *MyModule) Example(sourcePath string) *dagger.Changeset {
return dag.
RustSdkDev(sourcePath).
Changes()
}@function
def example(source_path: str) -> dagger.Changeset:
return (
dag.rust_sdk_dev(source_path)
.changes()
)@func()
example(sourcePath: string): Changeset {
return dag
.rustSdkDev(sourcePath)
.changes()
}withGeneratedClient() 🔗
Return Type
RustSdkDev ! Example
dagger -m github.com/shykes/dagger/toolchains/rust-sdk-dev@7ec44c64b509793d2a722ebdfef94a77dbcdcefe call \
--source-path string with-generated-clientfunc (m *MyModule) Example(sourcePath string) *dagger.RustSdkDev {
return dag.
RustSdkDev(sourcePath).
WithGeneratedClient()
}@function
def example(source_path: str) -> dagger.RustSdkDev:
return (
dag.rust_sdk_dev(source_path)
.with_generated_client()
)@func()
example(sourcePath: string): RustSdkDev {
return dag
.rustSdkDev(sourcePath)
.withGeneratedClient()
}releaseDryRun() 🔗
Test the publishing process
Return Type
Void !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| sourceTag | String ! | "HEAD" | Source git tag to fake-release |
Example
dagger -m github.com/shykes/dagger/toolchains/rust-sdk-dev@7ec44c64b509793d2a722ebdfef94a77dbcdcefe call \
--source-path string release-dry-run --source-tag stringfunc (m *MyModule) Example(ctx context.Context, sourcePath string, sourceTag string) {
return dag.
RustSdkDev(sourcePath).
ReleaseDryRun(ctx, sourceTag)
}@function
async def example(source_path: str, source_tag: str) -> None:
return await (
dag.rust_sdk_dev(source_path)
.release_dry_run(source_tag)
)@func()
async example(sourcePath: string, sourceTag: string): Promise<void> {
return dag
.rustSdkDev(sourcePath)
.releaseDryRun(sourceTag)
}release() 🔗
Release the Rust SDK
Return Type
Void !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| sourceTag | String ! | - | Source git tag to release |
| cargoRegistryToken | Secret ! | - | No description provided |
Example
dagger -m github.com/shykes/dagger/toolchains/rust-sdk-dev@7ec44c64b509793d2a722ebdfef94a77dbcdcefe call \
--source-path string release --source-tag string --cargo-registry-token env:MYSECRETfunc (m *MyModule) Example(ctx context.Context, sourcePath string, sourceTag string, cargoRegistryToken *dagger.Secret) {
return dag.
RustSdkDev(sourcePath).
Release(ctx, sourceTag, cargoRegistryToken)
}@function
async def example(source_path: str, source_tag: str, cargo_registry_token: dagger.Secret) -> None:
return await (
dag.rust_sdk_dev(source_path)
.release(source_tag, cargo_registry_token)
)@func()
async example(sourcePath: string, sourceTag: string, cargoRegistryToken: Secret): Promise<void> {
return dag
.rustSdkDev(sourcePath)
.release(sourceTag, cargoRegistryToken)
}bump() 🔗
Bump the Rust SDK’s engine dependency version.
Return Type
Changeset !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| version | String ! | - | No description provided |
Example
dagger -m github.com/shykes/dagger/toolchains/rust-sdk-dev@7ec44c64b509793d2a722ebdfef94a77dbcdcefe call \
--source-path string bump --version stringfunc (m *MyModule) Example(sourcePath string, version string) *dagger.Changeset {
return dag.
RustSdkDev(sourcePath).
Bump(version)
}@function
def example(source_path: str, version: str) -> dagger.Changeset:
return (
dag.rust_sdk_dev(source_path)
.bump(version)
)@func()
example(sourcePath: string, version: string): Changeset {
return dag
.rustSdkDev(sourcePath)
.bump(version)
}