with rust template
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2022-11-06 00:39:03 +01:00
parent c6c42c4d08
commit 6c885ec33c
17 changed files with 312 additions and 3 deletions

View File

@@ -0,0 +1 @@
target/

1
example/rust-bin/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
target/

7
example/rust-bin/Cargo.lock generated Normal file
View File

@@ -0,0 +1,7 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 3
[[package]]
name = "rust-bin"
version = "0.1.0"

View File

@@ -0,0 +1,8 @@
[package]
name = "rust-bin"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]

34
example/rust-bin/main.go Normal file
View File

@@ -0,0 +1,34 @@
package main
import (
"context"
"log"
"git.front.kjuulh.io/kjuulh/bust/pkg/builder"
"git.front.kjuulh.io/kjuulh/bust/pkg/pipelines"
)
func main() {
ctx := context.Background()
if err := run(ctx); err != nil {
log.Fatal(err)
}
}
func run(ctx context.Context) error {
builder, err := builder.New(ctx)
if err != nil {
return err
}
defer builder.CleanUp()
return pipelines.
New(builder).
WithRustBin(&pipelines.RustBinOpts{
DockerImageOpt: &pipelines.DockerImageOpt{
ImageName: "rust-bin",
},
BinName: "rust-bin",
}).
Execute(ctx)
}

View File

@@ -0,0 +1,3 @@
fn main() {
println!("Hello, world!");
}