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`. --- etc/defaults/rust/TARGETS | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 etc/defaults/rust/TARGETS (limited to 'etc/defaults/rust/TARGETS') diff --git a/etc/defaults/rust/TARGETS b/etc/defaults/rust/TARGETS new file mode 100644 index 0000000..fbd1a69 --- /dev/null +++ b/etc/defaults/rust/TARGETS @@ -0,0 +1,43 @@ +{ "defaults": + { "type": "configure" + , "target": "defaults (unconfigured)" + , "arguments_config": ["TOOLCHAIN_CONFIG"] + , "config": + { "type": "let*" + , "bindings": + [ [ "toolchain" + , { "type": "lookup" + , "map": + { "type": "var" + , "name": "TOOLCHAIN_CONFIG" + , "default": {"type": "empty_map"} + } + , "key": "RUST" + , "default": {"type": "empty_map"} + } + ] + , [ "RUSTC" + , { "type": "lookup" + , "map": {"type": "var", "name": "toolchain"} + , "key": "RUSTC" + , "default": "rustc" + } + ] + , [ "PATH" + , { "type": "lookup" + , "map": {"type": "var", "name": "toolchain"} + , "key": "PATH" + , "default": [] + } + ] + ] + , "body": {"type": "env", "vars": ["RUSTC", "PATH"]} + } + } +, "defaults (unconfigured)": + { "type": "defaults" + , "arguments_config": ["RUSTC", "PATH"] + , "RUSTC": [{"type": "var", "name": "RUSTC"}] + , "PATH": {"type": "var", "name": "PATH"} + } +} -- cgit v1.2.3