Dagger
Search

rust

No long description provided.

Installation

dagger install codeberg.org/clouds666/daggerverse/rust@684b57ce79b6e19cd3a85cfb82930c893bb1e51a

Entrypoint

Return Type
Rust !
Arguments
NameTypeDefault ValueDescription
rustVersionString !"1.95"No description provided
alpineVersionString !"3.23"No description provided
components[String ! ] -No description provided
packages[String ! ] -No description provided
Example
dagger -m codeberg.org/clouds666/daggerverse/rust@684b57ce79b6e19cd3a85cfb82930c893bb1e51a call \
 --rust-version string --alpine-version string
func (m *MyModule) Example(rustVersion string, alpineVersion string) *dagger.Rust  {
	return dag.
			Rust(rustVersion, alpineVersion)
}
@function
def example(rust_version: str, alpine_version: str, ) -> dagger.Rust:
	return (
		dag.rust(rust_version, alpine_version)
	)
@func()
example(rustVersion: string, alpineVersion: string, ): Rust {
	return dag
		.rust(rustVersion, alpineVersion)
}

Types

Rust 🔗

rustVersion() 🔗

Version of rust to use

Return Type
String !
Example
dagger -m codeberg.org/clouds666/daggerverse/rust@684b57ce79b6e19cd3a85cfb82930c893bb1e51a call \
 --rust-version string --alpine-version string rust-version
func (m *MyModule) Example(ctx context.Context, rustVersion string, alpineVersion string) string  {
	return dag.
			Rust(rustVersion, alpineVersion).
			RustVersion(ctx)
}
@function
async def example(rust_version: str, alpine_version: str, ) -> str:
	return await (
		dag.rust(rust_version, alpine_version)
		.rust_version()
	)
@func()
async example(rustVersion: string, alpineVersion: string, ): Promise<string> {
	return dag
		.rust(rustVersion, alpineVersion)
		.rustVersion()
}

alpineVersion() 🔗

Version of alpine to use

Return Type
String !
Example
dagger -m codeberg.org/clouds666/daggerverse/rust@684b57ce79b6e19cd3a85cfb82930c893bb1e51a call \
 --rust-version string --alpine-version string alpine-version
func (m *MyModule) Example(ctx context.Context, rustVersion string, alpineVersion string) string  {
	return dag.
			Rust(rustVersion, alpineVersion).
			AlpineVersion(ctx)
}
@function
async def example(rust_version: str, alpine_version: str, ) -> str:
	return await (
		dag.rust(rust_version, alpine_version)
		.alpine_version()
	)
@func()
async example(rustVersion: string, alpineVersion: string, ): Promise<string> {
	return dag
		.rust(rustVersion, alpineVersion)
		.alpineVersion()
}

components() 🔗

Rust components to install in addition to rustfmt and clippy

Return Type
[String ! ] !
Example
dagger -m codeberg.org/clouds666/daggerverse/rust@684b57ce79b6e19cd3a85cfb82930c893bb1e51a call \
 --rust-version string --alpine-version string components
func (m *MyModule) Example(ctx context.Context, rustVersion string, alpineVersion string) []string  {
	return dag.
			Rust(rustVersion, alpineVersion).
			Components(ctx)
}
@function
async def example(rust_version: str, alpine_version: str, ) -> List[str]:
	return await (
		dag.rust(rust_version, alpine_version)
		.components()
	)
@func()
async example(rustVersion: string, alpineVersion: string, ): Promise<string[]> {
	return dag
		.rust(rustVersion, alpineVersion)
		.components()
}

packages() 🔗

Alpine packages to install in addition to pkgconfig and musl-dev

Return Type
[String ! ] !
Example
dagger -m codeberg.org/clouds666/daggerverse/rust@684b57ce79b6e19cd3a85cfb82930c893bb1e51a call \
 --rust-version string --alpine-version string packages
func (m *MyModule) Example(ctx context.Context, rustVersion string, alpineVersion string) []string  {
	return dag.
			Rust(rustVersion, alpineVersion).
			Packages(ctx)
}
@function
async def example(rust_version: str, alpine_version: str, ) -> List[str]:
	return await (
		dag.rust(rust_version, alpine_version)
		.packages()
	)
@func()
async example(rustVersion: string, alpineVersion: string, ): Promise<string[]> {
	return dag
		.rust(rustVersion, alpineVersion)
		.packages()
}

buildExecutable() 🔗

Build a service executable

Return Type
File !
Arguments
NameTypeDefault ValueDescription
sourceDirectory !-No description provided
pkgString !-No description provided
Example
dagger -m codeberg.org/clouds666/daggerverse/rust@684b57ce79b6e19cd3a85cfb82930c893bb1e51a call \
 --rust-version string --alpine-version string build-executable --source DIR_PATH --pkg string
func (m *MyModule) Example(rustVersion string, alpineVersion string, source *dagger.Directory, pkg string) *dagger.File  {
	return dag.
			Rust(rustVersion, alpineVersion).
			BuildExecutable(source, pkg)
}
@function
def example(rust_version: str, alpine_version: str, source: dagger.Directory, pkg: str) -> dagger.File:
	return (
		dag.rust(rust_version, alpine_version)
		.build_executable(source, pkg)
	)
@func()
example(rustVersion: string, alpineVersion: string, source: Directory, pkg: string): File {
	return dag
		.rust(rustVersion, alpineVersion)
		.buildExecutable(source, pkg)
}

buildImage() 🔗

Build a service image

Return Type
Container !
Arguments
NameTypeDefault ValueDescription
sourceDirectory !-No description provided
nameString !-No description provided
Example
dagger -m codeberg.org/clouds666/daggerverse/rust@684b57ce79b6e19cd3a85cfb82930c893bb1e51a call \
 --rust-version string --alpine-version string build-image --source DIR_PATH --name string
func (m *MyModule) Example(rustVersion string, alpineVersion string, source *dagger.Directory, name string) *dagger.Container  {
	return dag.
			Rust(rustVersion, alpineVersion).
			BuildImage(source, name)
}
@function
def example(rust_version: str, alpine_version: str, source: dagger.Directory, name: str) -> dagger.Container:
	return (
		dag.rust(rust_version, alpine_version)
		.build_image(source, name)
	)
@func()
example(rustVersion: string, alpineVersion: string, source: Directory, name: string): Container {
	return dag
		.rust(rustVersion, alpineVersion)
		.buildImage(source, name)
}

builder() 🔗

Returns a cached Rust builder container

Return Type
Container !
Arguments
NameTypeDefault ValueDescription
sourceDirectory !-No description provided
Example
dagger -m codeberg.org/clouds666/daggerverse/rust@684b57ce79b6e19cd3a85cfb82930c893bb1e51a call \
 --rust-version string --alpine-version string builder --source DIR_PATH
func (m *MyModule) Example(rustVersion string, alpineVersion string, source *dagger.Directory) *dagger.Container  {
	return dag.
			Rust(rustVersion, alpineVersion).
			Builder(source)
}
@function
def example(rust_version: str, alpine_version: str, source: dagger.Directory) -> dagger.Container:
	return (
		dag.rust(rust_version, alpine_version)
		.builder(source)
	)
@func()
example(rustVersion: string, alpineVersion: string, source: Directory): Container {
	return dag
		.rust(rustVersion, alpineVersion)
		.builder(source)
}

check() 🔗

Check the rust code

Return Type
Void !
Arguments
NameTypeDefault ValueDescription
sourceDirectory !-No description provided
pkgString -No description provided
Example
dagger -m codeberg.org/clouds666/daggerverse/rust@684b57ce79b6e19cd3a85cfb82930c893bb1e51a call \
 --rust-version string --alpine-version string check --source DIR_PATH
func (m *MyModule) Example(ctx context.Context, rustVersion string, alpineVersion string, source *dagger.Directory)   {
	return dag.
			Rust(rustVersion, alpineVersion).
			Check(ctx, source)
}
@function
async def example(rust_version: str, alpine_version: str, source: dagger.Directory) -> None:
	return await (
		dag.rust(rust_version, alpine_version)
		.check(source)
	)
@func()
async example(rustVersion: string, alpineVersion: string, source: Directory): Promise<void> {
	return dag
		.rust(rustVersion, alpineVersion)
		.check(source)
}

lint() 🔗

Lint the rust code

Return Type
Void !
Arguments
NameTypeDefault ValueDescription
sourceDirectory !-No description provided
pkgString -No description provided
Example
dagger -m codeberg.org/clouds666/daggerverse/rust@684b57ce79b6e19cd3a85cfb82930c893bb1e51a call \
 --rust-version string --alpine-version string lint --source DIR_PATH
func (m *MyModule) Example(ctx context.Context, rustVersion string, alpineVersion string, source *dagger.Directory)   {
	return dag.
			Rust(rustVersion, alpineVersion).
			Lint(ctx, source)
}
@function
async def example(rust_version: str, alpine_version: str, source: dagger.Directory) -> None:
	return await (
		dag.rust(rust_version, alpine_version)
		.lint(source)
	)
@func()
async example(rustVersion: string, alpineVersion: string, source: Directory): Promise<void> {
	return dag
		.rust(rustVersion, alpineVersion)
		.lint(source)
}

serviceContainer() 🔗

Create a minimal service container from an executable

Return Type
Container !
Arguments
NameTypeDefault ValueDescription
executableFile !-No description provided
nameString !-No description provided
Example
dagger -m codeberg.org/clouds666/daggerverse/rust@684b57ce79b6e19cd3a85cfb82930c893bb1e51a call \
 --rust-version string --alpine-version string service-container --executable file:path --name string
func (m *MyModule) Example(rustVersion string, alpineVersion string, executable *dagger.File, name string) *dagger.Container  {
	return dag.
			Rust(rustVersion, alpineVersion).
			ServiceContainer(executable, name)
}
@function
def example(rust_version: str, alpine_version: str, executable: dagger.File, name: str) -> dagger.Container:
	return (
		dag.rust(rust_version, alpine_version)
		.service_container(executable, name)
	)
@func()
example(rustVersion: string, alpineVersion: string, executable: File, name: string): Container {
	return dag
		.rust(rustVersion, alpineVersion)
		.serviceContainer(executable, name)
}

test() 🔗

Test the rust code

Return Type
Void !
Arguments
NameTypeDefault ValueDescription
sourceDirectory !-No description provided
pkgString -No description provided
Example
dagger -m codeberg.org/clouds666/daggerverse/rust@684b57ce79b6e19cd3a85cfb82930c893bb1e51a call \
 --rust-version string --alpine-version string test --source DIR_PATH
func (m *MyModule) Example(ctx context.Context, rustVersion string, alpineVersion string, source *dagger.Directory)   {
	return dag.
			Rust(rustVersion, alpineVersion).
			Test(ctx, source)
}
@function
async def example(rust_version: str, alpine_version: str, source: dagger.Directory) -> None:
	return await (
		dag.rust(rust_version, alpine_version)
		.test(source)
	)
@func()
async example(rustVersion: string, alpineVersion: string, source: Directory): Promise<void> {
	return dag
		.rust(rustVersion, alpineVersion)
		.test(source)
}