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

34 lines
586 B
CUE
Raw Normal View History

2022-04-19 22:45:36 +02:00
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
2022-04-20 16:23:28 +02:00
CARGO_TARGET_DIR: "/output/"
2022-04-19 22:45:36 +02:00
}
command: {
2022-04-20 16:23:28 +02:00
name: "cargo"
2022-04-19 22:45:36 +02:00
flags: {
2022-04-20 16:23:28 +02:00
"build": true
"--release": true
"--manifest-path": "/src/Cargo.toml"
2022-04-19 22:45:36 +02:00
}
}
export: directories: "/output": _
}
// Directory containing the output of the publish
2022-04-20 16:23:28 +02:00
output: container.export.directories."/output/target/release"
2022-04-19 22:45:36 +02:00
}