浏览代码

Merge pull request #3273 from sfackler/rust

Add a library file for Rust
Tianon Gravi 8 年之前
父节点
当前提交
6b3460546c

+ 14 - 0
library/rust

@@ -0,0 +1,14 @@
+# this file is generated via https://github.com/rust-lang-nursery/docker-rust/blob/28f9bc3266a89d640a23d29a5056cc66fb6e38d3/generate-stackbrew-library.sh
+
+Maintainers: Steven Fackler <[email protected]> (@sfackler)
+GitRepo: https://github.com/rust-lang-nursery/docker-rust.git
+
+Tags: 1.19.0-stretch, 1-stretch, 1.19-stretch, stretch, 1.19.0, 1, 1.19, latest
+Architectures: amd64, arm32v7, i386, ppc64le, s390x
+GitCommit: 01ce3e6230bc87557058a38b342f9e15aae3856c
+Directory: 1.19.0/stretch
+
+Tags: 1.19.0-jessie, 1-jessie, 1.19-jessie, jessie
+Architectures: amd64, arm32v7, i386, ppc64le, s390x
+GitCommit: 01ce3e6230bc87557058a38b342f9e15aae3856c
+Directory: 1.19.0/jessie

+ 3 - 0
test/config.sh

@@ -190,6 +190,9 @@ imageTests+=(
 		ruby-bundler
 		ruby-nonroot
 	'
+	[rust]='
+		rust-hello-world
+	'
 	[silverpeas]='
 		silverpeas-basics
 	'

+ 8 - 0
test/tests/run-rust-in-container.sh

@@ -0,0 +1,8 @@
+#!/bin/bash
+set -e
+
+testDir="$(readlink -f "$(dirname "$BASH_SOURCE")")"
+runDir="$(dirname "$(readlink -f "$BASH_SOURCE")")"
+
+source "$runDir/run-in-container.sh" "$testDir" "$1" cargo run -q --manifest-path=container/Cargo.toml
+

+ 7 - 0
test/tests/rust-hello-world/container/Cargo.toml

@@ -0,0 +1,7 @@
+[package]
+name = "container"
+version = "0.1.0"
+authors = ["Steven Fackler <[email protected]>"]
+
+[dependencies]
+libc = "0.2" # just make sure we can pull dependencies

+ 3 - 0
test/tests/rust-hello-world/container/src/main.rs

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

+ 1 - 0
test/tests/rust-hello-world/expected-std-out.txt

@@ -0,0 +1 @@
+Hello, world!

+ 1 - 0
test/tests/rust-hello-world/run.sh

@@ -0,0 +1 @@
+../run-rust-in-container.sh