From f7026294ac8d3054fec52d13423195d918d9cfc4 Mon Sep 17 00:00:00 2001 From: Ben Hearsum Date: Mon, 8 May 2023 08:46:28 -0400 Subject: [PATCH] Skeleton for distributing run-task/fetch-content as rust binaries. --- .gitignore | 1 + pyproject.toml | 9 +++++++++ rust/run-task/Cargo.lock | 7 +++++++ rust/run-task/Cargo.toml | 16 ++++++++++++++++ rust/run-task/src/fetch_content/main.rs | 3 +++ rust/run-task/src/run_task/main.rs | 3 +++ 6 files changed, 39 insertions(+) create mode 100644 rust/run-task/Cargo.lock create mode 100644 rust/run-task/Cargo.toml create mode 100644 rust/run-task/src/fetch_content/main.rs create mode 100644 rust/run-task/src/run_task/main.rs diff --git a/.gitignore b/.gitignore index 05b140a34..4e5305cb2 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,7 @@ build/ dist/ docs/_build/ +rust/run-task/target # Python __pycache__/ diff --git a/pyproject.toml b/pyproject.toml index 33495bdcf..ce859e580 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,12 @@ +[build-system] +requires = ["maturin"] +build-backend = "maturin" + +[tool.maturin] +bindings = "bin" +manifest-path = "rust/run-task/Cargo.toml" +strip = true + [tool.black] line-length = 88 extend-exclude = """(\ diff --git a/rust/run-task/Cargo.lock b/rust/run-task/Cargo.lock new file mode 100644 index 000000000..2216080ac --- /dev/null +++ b/rust/run-task/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "run-task" +version = "0.1.0" diff --git a/rust/run-task/Cargo.toml b/rust/run-task/Cargo.toml new file mode 100644 index 000000000..1490c0ee0 --- /dev/null +++ b/rust/run-task/Cargo.toml @@ -0,0 +1,16 @@ +[package] +name = "run-task" +version = "0.1.0" +edition = "2021" + +[[bin]] +name = "run-task" +path = "src/run_task/main.rs" + +[[bin]] +name = "fetch-content" +path = "src/fetch_content/main.rs" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] diff --git a/rust/run-task/src/fetch_content/main.rs b/rust/run-task/src/fetch_content/main.rs new file mode 100644 index 000000000..d1071c9a2 --- /dev/null +++ b/rust/run-task/src/fetch_content/main.rs @@ -0,0 +1,3 @@ +fn main() { + println!("Hello, world! Fetch Content!"); +} diff --git a/rust/run-task/src/run_task/main.rs b/rust/run-task/src/run_task/main.rs new file mode 100644 index 000000000..5f803337e --- /dev/null +++ b/rust/run-task/src/run_task/main.rs @@ -0,0 +1,3 @@ +fn main() { + println!("Hello, world! run-task"); +}