From e65cf1d265210738a9b3c0b811fbfeffa0741c39 Mon Sep 17 00:00:00 2001 From: "Klaus T. Aehlig" Date: Tue, 25 Jun 2024 17:59:39 +0200 Subject: Import rust rules and add a minimal example Note that the PATH for rust targets also has to include that for the C compiler and hence also coreutils, as the rust compiler calls out to `cc`. --- src/rust/hello/TARGETS | 6 ++++++ src/rust/hello/main.rs | 3 +++ 2 files changed, 9 insertions(+) create mode 100644 src/rust/hello/TARGETS create mode 100644 src/rust/hello/main.rs (limited to 'src/rust/hello') diff --git a/src/rust/hello/TARGETS b/src/rust/hello/TARGETS new file mode 100644 index 0000000..348e7fe --- /dev/null +++ b/src/rust/hello/TARGETS @@ -0,0 +1,6 @@ +{ "": + { "type": ["@", "rust", "rust", "binary"] + , "name": ["hello"] + , "crate_root": ["main.rs"] + } +} diff --git a/src/rust/hello/main.rs b/src/rust/hello/main.rs new file mode 100644 index 0000000..21e1c4e --- /dev/null +++ b/src/rust/hello/main.rs @@ -0,0 +1,3 @@ +fn main() { + println!("Hello, World!"); +} -- cgit v1.2.3