Dagger
Search

rust

This module provides a set of functions to build, test, and run clippy on a Rust project 🦀

Installation

dagger install github.com/fluent-ci-templates/rust-pipeline@v0.10.6

Entrypoint

Return Type
Rust
Example
func (m *myModule) example() *Rust  {
	return dag.
			Rust()
}
@function
def example() -> dag.Rust:
	return (
		dag.rust()
	)
@func()
example(): Rust {
	return dag
		.rust()
}

Types

Rust 🔗

clippy() 🔗

Run clippy

Return Type
File !
Arguments
NameTypeDefault ValueDescription
srcDirectory -No description provided
Example
func (m *myModule) example() *File  {
	return dag.
			Rust().
			Clippy()
}
@function
def example() -> dagger.File:
	return (
		dag.rust()
		.clippy()
	)
@func()
example(): File {
	return dag
		.rust()
		.clippy()
}

llvmCov() 🔗

Generate llvm coverage report

Return Type
File !
Arguments
NameTypeDefault ValueDescription
srcDirectory -No description provided
Example
func (m *myModule) example() *File  {
	return dag.
			Rust().
			LlvmCov()
}
@function
def example() -> dagger.File:
	return (
		dag.rust()
		.llvm_cov()
	)
@func()
example(): File {
	return dag
		.rust()
		.llvmCov()
}

test() 🔗

Run tests

Return Type
String !
Arguments
NameTypeDefault ValueDescription
srcDirectory -No description provided
options[String ! ] []No description provided
Example
func (m *myModule) example(ctx context.Context) string  {
	return dag.
			Rust().
			Test(ctx)
}
@function
async def example() -> str:
	return await (
		dag.rust()
		.test()
	)
@func()
async example(): Promise<string> {
	return dag
		.rust()
		.test()
}

build() 🔗

Build the project

Return Type
Directory !
Arguments
NameTypeDefault ValueDescription
srcDirectory -No description provided
packageNameString -No description provided
targetString "x86_64-unknown-linux-gnu"No description provided
options[String ! ] []No description provided
Example
func (m *myModule) example() *Directory  {
	return dag.
			Rust().
			Build()
}
@function
def example() -> dagger.Directory:
	return (
		dag.rust()
		.build()
	)
@func()
example(): Directory {
	return dag
		.rust()
		.build()
}