Dagger
Search

cargo

No long description provided.

Installation

dagger install github.com/grouville/daggerverse/cargo@ad0e823d0e4885221b52c4e09c83aad743fce454

Entrypoint

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

Types

Cargo 🔗

ctr() 🔗

Return Type
Container !
Example
func (m *myModule) example() *Container  {
	return dag.
			Cargo().
			Ctr()
}
@function
def example() -> dagger.Container:
	return (
		dag.cargo()
		.ctr()
	)
@func()
example(): Container {
	return dag
		.cargo()
		.ctr()
}

proj() 🔗

Return Type
Directory !
Example
func (m *myModule) example() *Directory  {
	return dag.
			Cargo().
			Proj()
}
@function
def example() -> dagger.Directory:
	return (
		dag.cargo()
		.proj()
	)
@func()
example(): Directory {
	return dag
		.cargo()
		.proj()
}

build() 🔗

Build the project

Return Type
Directory !
Arguments
NameTypeDefault ValueDescription
args[String ! ] !-No description provided
Example
func (m *myModule) example(args []string) *Directory  {
	return dag.
			Cargo().
			Build(args)
}
@function
def example(args: List[str]) -> dagger.Directory:
	return (
		dag.cargo()
		.build(args)
	)
@func()
example(args: string[]): Directory {
	return dag
		.cargo()
		.build(args)
}

fmt() 🔗

Format the project

Return Type
String !
Arguments
NameTypeDefault ValueDescription
args[String ! ] !-No description provided
Example
func (m *myModule) example(ctx context.Context, args []string) string  {
	return dag.
			Cargo().
			Fmt(ctx, args)
}
@function
async def example(args: List[str]) -> str:
	return await (
		dag.cargo()
		.fmt(args)
	)
@func()
async example(args: string[]): Promise<string> {
	return dag
		.cargo()
		.fmt(args)
}

test() 🔗

Test the project

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

clippy() 🔗

Lint the project

Return Type
String !
Example
func (m *myModule) example(ctx context.Context) string  {
	return dag.
			Cargo().
			Clippy(ctx)
}
@function
async def example() -> str:
	return await (
		dag.cargo()
		.clippy()
	)
@func()
async example(): Promise<string> {
	return dag
		.cargo()
		.clippy()
}

base() 🔗

Sets up the Container with a rust image

Return Type
Cargo !
Arguments
NameTypeDefault ValueDescription
versionString !-No description provided
Example
func (m *myModule) example(version string) *Cargo  {
	return dag.
			Cargo().
			Base(version)
}
@function
def example(version: str) -> dag.Cargo:
	return (
		dag.cargo()
		.base(version)
	)
@func()
example(version: string): Cargo {
	return dag
		.cargo()
		.base(version)
}

installFromGit() 🔗

Install a package from a git repository

Return Type
Cargo !
Arguments
NameTypeDefault ValueDescription
urlString !-No description provided
branchString !-No description provided
binString !-No description provided
pkgString !-No description provided
Example
func (m *myModule) example(url string, branch string, bin string, pkg string) *Cargo  {
	return dag.
			Cargo().
			InstallFromGit(url, branch, bin, pkg)
}
@function
def example(url: str, branch: str, bin: str, pkg: str) -> dag.Cargo:
	return (
		dag.cargo()
		.install_from_git(url, branch, bin, pkg)
	)
@func()
example(url: string, branch: string, bin: string, pkg: string): Cargo {
	return dag
		.cargo()
		.installFromGit(url, branch, bin, pkg)
}

container() 🔗

Accessor for the Container

Return Type
Container !
Example
func (m *myModule) example() *Container  {
	return dag.
			Cargo().
			Container()
}
@function
def example() -> dagger.Container:
	return (
		dag.cargo()
		.container()
	)
@func()
example(): Container {
	return dag
		.cargo()
		.container()
}

project() 🔗

Accessor for the Project

Return Type
Directory !
Example
func (m *myModule) example() *Directory  {
	return dag.
			Cargo().
			Project()
}
@function
def example() -> dagger.Directory:
	return (
		dag.cargo()
		.project()
	)
@func()
example(): Directory {
	return dag
		.cargo()
		.project()
}

withProject() 🔗

Specify the Project to use in the module

Return Type
Cargo !
Arguments
NameTypeDefault ValueDescription
dirDirectory !-No description provided
Example
func (m *myModule) example(dir *Directory) *Cargo  {
	return dag.
			Cargo().
			WithProject(dir)
}
@function
def example(dir: dagger.Directory) -> dag.Cargo:
	return (
		dag.cargo()
		.with_project(dir)
	)
@func()
example(dir: Directory): Cargo {
	return dag
		.cargo()
		.withProject(dir)
}

withContainer() 🔗

Bring your own container

Return Type
Cargo !
Arguments
NameTypeDefault ValueDescription
ctrContainer !-No description provided
Example
func (m *myModule) example(ctr *Container) *Cargo  {
	return dag.
			Cargo().
			WithContainer(ctr)
}
@function
def example(ctr: dagger.Container) -> dag.Cargo:
	return (
		dag.cargo()
		.with_container(ctr)
	)
@func()
example(ctr: Container): Cargo {
	return dag
		.cargo()
		.withContainer(ctr)
}