1
0
Fork 0
mirror of https://github.com/imjasonh/krust synced 2026-07-08 06:45:32 +00:00
krust/tests/testdata/build_example.txt

27 lines
689 B
Text
Raw Normal View History

# Test building examples with --example flag
-- Cargo.toml --
[package]
name = "test-app"
version = "0.1.0"
edition = "2021"
[dependencies]
-- src/main.rs --
fn main() {
println!("Hello from main!");
}
-- examples/example_server.rs --
fn main() {
println!("Hello from example!");
}
# Build the example binary
[linux] env KRUST_REPO=ttl.sh/test exec ./krust build --no-push --platform linux/amd64 . -- --example example_server
[darwin] env KRUST_REPO=ttl.sh/test exec ./krust build --no-push --platform linux/amd64 . -- --example example_server
stderr 'Building Rust project'
stderr 'Successfully built binary'
stderr 'examples/example_server'
stderr 'Successfully built image'