aboutsummaryrefslogtreecommitdiffhomepage
path: root/examples
diff options
context:
space:
mode:
authorGravatar Damien Martin-Guillerez <dmarting@google.com>2016-05-09 14:28:07 +0000
committerGravatar Klaus Aehlig <aehlig@google.com>2016-05-09 14:41:46 +0000
commitde424b6c1d0fcfd5b8cb58d495ce98cf73be58dd (patch)
tree7b8fcff3b169c5813f45214dae211afbcca1f410 /examples
parentfab3925f76832b64113624bc2ea1c6861fca768d (diff)
Remove rust, jsonnet, scala and closure from the Bazel repository
Diffstat (limited to 'examples')
-rw-r--r--examples/jsonnet/BUILD67
-rw-r--r--examples/jsonnet/intersection.jsonnet60
-rw-r--r--examples/jsonnet/intersection_golden.json48
-rw-r--r--examples/jsonnet/invalid.jsonnet15
-rw-r--r--examples/jsonnet/invalid.out2
-rw-r--r--examples/jsonnet/shell-workflows.jsonnet21
-rw-r--r--examples/jsonnet/wordcount.jsonnet59
-rw-r--r--examples/jsonnet/wordcount_golden.json53
-rw-r--r--examples/jsonnet/workflow.jsonnet46
-rw-r--r--examples/rust/fibonacci/BUILD36
-rw-r--r--examples/rust/fibonacci/benches/fibonacci_bench.rs25
-rw-r--r--examples/rust/fibonacci/src/lib.rs48
-rw-r--r--examples/rust/hello_lib/BUILD38
-rw-r--r--examples/rust/hello_lib/src/greeter.rs73
-rw-r--r--examples/rust/hello_lib/src/lib.rs15
-rw-r--r--examples/rust/hello_lib/tests/greeting.rs23
-rw-r--r--examples/rust/hello_world/BUILD19
-rw-r--r--examples/rust/hello_world/src/main.rs22
18 files changed, 0 insertions, 670 deletions
diff --git a/examples/jsonnet/BUILD b/examples/jsonnet/BUILD
deleted file mode 100644
index 72bc4eee69..0000000000
--- a/examples/jsonnet/BUILD
+++ /dev/null
@@ -1,67 +0,0 @@
-package(default_visibility = ["//visibility:public"])
-
-load(
- "//tools/build_defs/jsonnet:jsonnet.bzl",
- "jsonnet_library",
- "jsonnet_to_json",
- "jsonnet_to_json_test",
-)
-
-jsonnet_library(
- name = "workflow",
- srcs = ["workflow.jsonnet"],
-)
-
-jsonnet_to_json(
- name = "wordcount",
- src = "wordcount.jsonnet",
- outs = ["wordcount.json"],
- deps = [":workflow"],
-)
-
-jsonnet_to_json_test(
- name = "wordcount_test",
- src = "wordcount.jsonnet",
- golden = "wordcount_golden.json",
- deps = [":workflow"],
-)
-
-jsonnet_to_json(
- name = "intersection",
- src = "intersection.jsonnet",
- outs = ["intersection.json"],
- deps = [":workflow"],
-)
-
-jsonnet_to_json_test(
- name = "intersection_test",
- src = "intersection.jsonnet",
- golden = "intersection_golden.json",
- deps = [":workflow"],
-)
-
-jsonnet_library(
- name = "shell-workflows-lib",
- srcs = [
- "intersection.jsonnet",
- "wordcount.jsonnet",
- ],
- deps = [":workflow"],
-)
-
-jsonnet_to_json(
- name = "shell-workflows",
- src = "shell-workflows.jsonnet",
- outs = [
- "intersection-workflow.json",
- "wordcount-workflow.json",
- ],
- deps = [":shell-workflows-lib"],
-)
-
-jsonnet_to_json_test(
- name = "invalid_test",
- src = "invalid.jsonnet",
- error = 1,
- golden = "invalid.out",
-)
diff --git a/examples/jsonnet/intersection.jsonnet b/examples/jsonnet/intersection.jsonnet
deleted file mode 100644
index 17aa6a36ba..0000000000
--- a/examples/jsonnet/intersection.jsonnet
+++ /dev/null
@@ -1,60 +0,0 @@
-// Copyright 2015 The Bazel Authors. All rights reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-local workflow = import "examples/jsonnet/workflow.jsonnet";
-
-// Workflow that performs an intersection of two files using shell commands.
-{
- intersection: workflow.Workflow {
- jobs: {
- local input_file1 = "/tmp/list1",
- local input_file2 = "/tmp/list2",
- local sorted_file1 = "/tmp/list1_sorted",
- local sorted_file2 = "/tmp/list2_sorted",
- local intersection = "/tmp/intersection",
-
- SortJob:: workflow.ShJob {
- input_file:: "",
- output_file:: "",
- command: "sort %s > %s" % [self.input_file, self.output_file],
- inputs: [self.input_file],
- outputs: [self.output_file],
- },
-
- sort_file1: self.SortJob {
- input_file:: input_file1,
- output_file:: sorted_file1,
- },
-
- sort_file2: self.SortJob {
- input_file:: input_file2,
- output_file:: sorted_file2,
- },
-
- intersect: workflow.ShJob {
- deps: [
- ":sort_file1",
- ":sort_file2",
- ],
- command: "comm -12 %s %s > %s" %
- [sorted_file1, sorted_file2, intersection],
- inputs: [
- sorted_file1,
- sorted_file2,
- ],
- outputs: [intersection],
- },
- }
- }
-}
diff --git a/examples/jsonnet/intersection_golden.json b/examples/jsonnet/intersection_golden.json
deleted file mode 100644
index 6e8fa63864..0000000000
--- a/examples/jsonnet/intersection_golden.json
+++ /dev/null
@@ -1,48 +0,0 @@
-{
- "intersection": {
- "jobs": {
- "intersect": {
- "command": "comm -12 /tmp/list1_sorted /tmp/list2_sorted > /tmp/intersection",
- "deps": [
- ":sort_file1",
- ":sort_file2"
- ],
- "inputs": [
- "/tmp/list1_sorted",
- "/tmp/list2_sorted"
- ],
- "outputs": [
- "/tmp/intersection"
- ],
- "type": "sh",
- "vars": { }
- },
- "sort_file1": {
- "command": "sort /tmp/list1 > /tmp/list1_sorted",
- "deps": [ ],
- "inputs": [
- "/tmp/list1"
- ],
- "outputs": [
- "/tmp/list1_sorted"
- ],
- "type": "sh",
- "vars": { }
- },
- "sort_file2": {
- "command": "sort /tmp/list2 > /tmp/list2_sorted",
- "deps": [ ],
- "inputs": [
- "/tmp/list2"
- ],
- "outputs": [
- "/tmp/list2_sorted"
- ],
- "type": "sh",
- "vars": { }
- }
- },
- "retries": 5,
- "schedule": { }
- }
-}
diff --git a/examples/jsonnet/invalid.jsonnet b/examples/jsonnet/invalid.jsonnet
deleted file mode 100644
index e911037832..0000000000
--- a/examples/jsonnet/invalid.jsonnet
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2015 The Bazel Authors. All rights reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-error "Foo."
diff --git a/examples/jsonnet/invalid.out b/examples/jsonnet/invalid.out
deleted file mode 100644
index 6c220f5170..0000000000
--- a/examples/jsonnet/invalid.out
+++ /dev/null
@@ -1,2 +0,0 @@
-RUNTIME ERROR: Foo.
- examples/jsonnet/invalid.jsonnet:15:1-12
diff --git a/examples/jsonnet/shell-workflows.jsonnet b/examples/jsonnet/shell-workflows.jsonnet
deleted file mode 100644
index bcf44c76ec..0000000000
--- a/examples/jsonnet/shell-workflows.jsonnet
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright 2015 The Bazel Authors. All rights reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-local wordcount = import "examples/jsonnet/wordcount.jsonnet";
-local intersection = import "examples/jsonnet/intersection.jsonnet";
-
-{
- "wordcount-workflow.json": wordcount,
- "intersection-workflow.json": intersection,
-}
diff --git a/examples/jsonnet/wordcount.jsonnet b/examples/jsonnet/wordcount.jsonnet
deleted file mode 100644
index f1dfe2bfef..0000000000
--- a/examples/jsonnet/wordcount.jsonnet
+++ /dev/null
@@ -1,59 +0,0 @@
-// Copyright 2015 The Bazel Authors. All rights reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-local workflow = import "examples/jsonnet/workflow.jsonnet";
-
-// Workflow that performs a wordcount using shell commands.
-{
- wordcount: workflow.Workflow {
- retries: 12,
- schedule: workflow.Schedule {
- start_date: "2015-11-15",
- start_time: "17:30",
- repeat_frequency: 1,
- repeat_type: "week",
- },
- jobs: {
- local input_file = "/tmp/passage_test",
- local tokens_file = "/tmp/tokens",
- local sorted_tokens_file = "/tmp/sorted_tokens",
- local counts_file = "/tmp/counts",
-
- // Reads the input file and produces an output file with one word per
- // line.
- tokenize: workflow.ShJob {
- command: "tr ' ' '\n' < %s > %s" % [input_file, tokens_file],
- inputs: [input_file],
- outputs: [tokens_file],
- },
-
- // Takes the tokens file and produces a file with the tokens sorted.
- sort: workflow.ShJob {
- deps: [":tokenize"],
- command: "sort %s > %s" % [tokens_file, sorted_tokens_file],
- inputs: [tokens_file],
- outputs: [sorted_tokens_file],
- },
-
- // Takes the file containing sorted tokens and produces a file containing
- // the counts for each word.
- count: workflow.ShJob {
- deps: [":sort"],
- command: "uniq -c %s > %s" % [sorted_tokens_file, counts_file],
- inputs: [sorted_tokens_file],
- outputs: [counts_file],
- },
- }
- }
-}
diff --git a/examples/jsonnet/wordcount_golden.json b/examples/jsonnet/wordcount_golden.json
deleted file mode 100644
index 25d99cf3ab..0000000000
--- a/examples/jsonnet/wordcount_golden.json
+++ /dev/null
@@ -1,53 +0,0 @@
-{
- "wordcount": {
- "jobs": {
- "count": {
- "command": "uniq -c /tmp/sorted_tokens > /tmp/counts",
- "deps": [
- ":sort"
- ],
- "inputs": [
- "/tmp/sorted_tokens"
- ],
- "outputs": [
- "/tmp/counts"
- ],
- "type": "sh",
- "vars": { }
- },
- "sort": {
- "command": "sort /tmp/tokens > /tmp/sorted_tokens",
- "deps": [
- ":tokenize"
- ],
- "inputs": [
- "/tmp/tokens"
- ],
- "outputs": [
- "/tmp/sorted_tokens"
- ],
- "type": "sh",
- "vars": { }
- },
- "tokenize": {
- "command": "tr ' ' '\n' < /tmp/passage_test > /tmp/tokens",
- "deps": [ ],
- "inputs": [
- "/tmp/passage_test"
- ],
- "outputs": [
- "/tmp/tokens"
- ],
- "type": "sh",
- "vars": { }
- }
- },
- "retries": 12,
- "schedule": {
- "repeat_frequency": 1,
- "repeat_type": "week",
- "start_date": "2015-11-15",
- "start_time": "17:30"
- }
- }
-}
diff --git a/examples/jsonnet/workflow.jsonnet b/examples/jsonnet/workflow.jsonnet
deleted file mode 100644
index a093a0ec38..0000000000
--- a/examples/jsonnet/workflow.jsonnet
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2015 The Bazel Authors. All rights reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-// Configuration for a hypothetical workflow scheduling system.
-{
- // Configuration for a workflow.
- Workflow:: {
- schedule: {},
- retries: 5,
- jobs: {},
- },
-
- // Scheduling configuration for a workflow.
- Schedule:: {
- start_date: "",
- start_time: "",
- repeat_frequency: 0,
- repeat_type: "",
- },
-
- // Base configuration for a Job in a workflow.
- Job:: {
- type: "base",
- deps: [],
- inputs: [],
- outputs: [],
- },
-
- // Configuration for a job that runs a shell command.
- ShJob:: self.Job {
- type: "sh",
- command: "",
- vars: {},
- }
-}
diff --git a/examples/rust/fibonacci/BUILD b/examples/rust/fibonacci/BUILD
deleted file mode 100644
index 74f7914217..0000000000
--- a/examples/rust/fibonacci/BUILD
+++ /dev/null
@@ -1,36 +0,0 @@
-package(default_visibility = ["//visibility:public"])
-
-load(
- "//tools/build_rules/rust:rust.bzl",
- "rust_library",
- "rust_test",
- "rust_bench_test",
- "rust_doc",
- "rust_doc_test",
-)
-
-rust_library(
- name = "fibonacci",
- srcs = ["src/lib.rs"],
-)
-
-rust_test(
- name = "fibonacci_test",
- deps = [":fibonacci"],
-)
-
-rust_bench_test(
- name = "fibonacci_bench",
- srcs = ["benches/fibonacci_bench.rs"],
- deps = [":fibonacci"],
-)
-
-rust_doc(
- name = "fibonacci_doc",
- dep = ":fibonacci",
-)
-
-rust_doc_test(
- name = "fibonacci_doc_test",
- dep = ":fibonacci",
-)
diff --git a/examples/rust/fibonacci/benches/fibonacci_bench.rs b/examples/rust/fibonacci/benches/fibonacci_bench.rs
deleted file mode 100644
index 80aa1a84ce..0000000000
--- a/examples/rust/fibonacci/benches/fibonacci_bench.rs
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright 2015 The Bazel Authors. All rights reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#![feature(test)]
-
-extern crate test;
-extern crate fibonacci;
-
-use test::Bencher;
-
-#[bench]
-fn bench_fibonacci(b: &mut Bencher) {
- b.iter(|| fibonacci::fibonacci(40));
-}
diff --git a/examples/rust/fibonacci/src/lib.rs b/examples/rust/fibonacci/src/lib.rs
deleted file mode 100644
index d8ae6e3fca..0000000000
--- a/examples/rust/fibonacci/src/lib.rs
+++ /dev/null
@@ -1,48 +0,0 @@
-// Copyright 2015 The Bazel Authors. All rights reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-/// Returns the nth Fibonacci number.
-///
-/// # Examples
-///
-/// ```
-/// fibonacci::fibonacci(5)
-/// ```
-pub fn fibonacci(n: u64) -> u64 {
- if n < 2 {
- return n;
- }
- let mut n1: u64 = 0;
- let mut n2: u64 = 1;
- for _ in 1..n {
- let sum = n1 + n2;
- n1 = n2;
- n2 = sum;
- }
- n2
-}
-
-#[cfg(test)]
-mod test {
- use super::fibonacci;
-
- #[test]
- fn test_fibonacci() {
- let numbers : Vec<u64> =
- vec![0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144];
- for (i, number) in numbers.iter().enumerate() {
- assert_eq!(*number, fibonacci(i as u64));
- }
- }
-}
diff --git a/examples/rust/hello_lib/BUILD b/examples/rust/hello_lib/BUILD
deleted file mode 100644
index c47368727a..0000000000
--- a/examples/rust/hello_lib/BUILD
+++ /dev/null
@@ -1,38 +0,0 @@
-package(default_visibility = ["//visibility:public"])
-
-load(
- "//tools/build_rules/rust:rust.bzl",
- "rust_library",
- "rust_test",
- "rust_doc",
- "rust_doc_test",
-)
-
-rust_library(
- name = "hello_lib",
- srcs = [
- "src/greeter.rs",
- "src/lib.rs",
- ],
-)
-
-rust_test(
- name = "hello_lib_test",
- deps = [":hello_lib"],
-)
-
-rust_test(
- name = "greeting_test",
- srcs = ["tests/greeting.rs"],
- deps = [":hello_lib"],
-)
-
-rust_doc(
- name = "hello_lib_doc",
- dep = ":hello_lib",
-)
-
-rust_doc_test(
- name = "hello_lib_doc_test",
- dep = ":hello_lib",
-)
diff --git a/examples/rust/hello_lib/src/greeter.rs b/examples/rust/hello_lib/src/greeter.rs
deleted file mode 100644
index bf332e4bd1..0000000000
--- a/examples/rust/hello_lib/src/greeter.rs
+++ /dev/null
@@ -1,73 +0,0 @@
-// Copyright 2015 The Bazel Authors. All rights reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-/// Object that displays a greeting.
-pub struct Greeter {
- greeting: String,
-}
-
-/// Implementation of Greeter.
-impl Greeter {
- /// Constructs a new `Greeter`.
- ///
- /// # Examples
- ///
- /// ```
- /// use hello_lib::greeter;
- ///
- /// let greeter = Greeter::new("Hello");
- /// ```
- pub fn new(greeting: &str) -> Greeter {
- Greeter { greeting: greeting.to_string(), }
- }
-
- /// Returns the greeting as a string.
- ///
- /// # Examples
- ///
- /// ```
- /// use hello_lib::greeter;
- ///
- /// let greeter = Greeter::new("Hello");
- /// let greeting = greeter.greeting("World");
- /// ```
- pub fn greeting(&self, thing: &str) -> String {
- format!("{} {}", &self.greeting, thing)
- }
-
- /// Prints the greeting.
- ///
- /// # Examples
- ///
- /// ```
- /// use hello_lib::greeter;
- ///
- /// let greeter = Greeter::new("Hello");
- /// greeter.greet("World");
- /// ```
- pub fn greet(&self, thing: &str) {
- println!("{} {}", &self.greeting, thing);
- }
-}
-
-#[cfg(test)]
-mod test {
- use super::Greeter;
-
- #[test]
- fn test_greeting() {
- let hello = Greeter::new("Hi");
- assert_eq!("Hi Rust", hello.greeting("Rust"));
- }
-}
diff --git a/examples/rust/hello_lib/src/lib.rs b/examples/rust/hello_lib/src/lib.rs
deleted file mode 100644
index 9dc608911f..0000000000
--- a/examples/rust/hello_lib/src/lib.rs
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2015 The Bazel Authors. All rights reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-pub mod greeter;
diff --git a/examples/rust/hello_lib/tests/greeting.rs b/examples/rust/hello_lib/tests/greeting.rs
deleted file mode 100644
index be3435681b..0000000000
--- a/examples/rust/hello_lib/tests/greeting.rs
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright 2015 The Bazel Authors. All rights reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-extern crate hello_lib;
-
-use hello_lib::greeter;
-
-#[test]
-fn test_greeting() {
- let hello = greeter::Greeter::new("Hello");
- assert_eq!("Hello world", hello.greeting("world"));
-}
diff --git a/examples/rust/hello_world/BUILD b/examples/rust/hello_world/BUILD
deleted file mode 100644
index e78362915c..0000000000
--- a/examples/rust/hello_world/BUILD
+++ /dev/null
@@ -1,19 +0,0 @@
-package(default_visibility = ["//visibility:public"])
-
-load("//tools/build_rules/rust:rust.bzl", "rust_binary", "rust_doc", "rust_doc_test")
-
-rust_binary(
- name = "hello_world",
- srcs = ["src/main.rs"],
- deps = ["//examples/rust/hello_lib"],
-)
-
-rust_doc(
- name = "hello_world_doc",
- dep = ":hello_world",
-)
-
-rust_doc_test(
- name = "hello_world_doc_test",
- dep = ":hello_world",
-)
diff --git a/examples/rust/hello_world/src/main.rs b/examples/rust/hello_world/src/main.rs
deleted file mode 100644
index 03cf43fcfe..0000000000
--- a/examples/rust/hello_world/src/main.rs
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright 2015 The Bazel Authors. All rights reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-extern crate hello_lib;
-
-use hello_lib::greeter;
-
-fn main() {
- let hello = greeter::Greeter::new("Hello");
- hello.greet("world");
-}