This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
dagger/pkg/universe.dagger.io/x/contact@kjuulh.io/rust/publish.cue
2022-04-20 16:23:53 +02:00

34 lines
586 B
CUE

package rust
import (
"dagger.io/dagger"
)
// Publish a rust binary
#Publish: {
// Source code
source: dagger.#FS
env: [string]: string
container: #Container & {
"source": source
"env": {
env
CARGO_TARGET_DIR: "/output/"
}
command: {
name: "cargo"
flags: {
"build": true
"--release": true
"--manifest-path": "/src/Cargo.toml"
}
}
export: directories: "/output": _
}
// Directory containing the output of the publish
output: container.export.directories."/output/target/release"
}