aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/.template
diff options
context:
space:
mode:
Diffstat (limited to '.template')
-rw-r--r--.template/Cargo.toml13
-rw-r--r--.template/pre-script.rhai4
-rw-r--r--.template/pyproject.toml13
3 files changed, 30 insertions, 0 deletions
diff --git a/.template/Cargo.toml b/.template/Cargo.toml
new file mode 100644
index 0000000..1997d0d
--- /dev/null
+++ b/.template/Cargo.toml
@@ -0,0 +1,13 @@
+[package]
+authors = ["{{authors}}"]
+name = "{{project-name}}"
+version = "0.1.0"
+edition = "2021"
+
+[lib]
+name = "hydrorolldemo"
+crate-type = ["cdylib"]
+
+[dependencies]
+pyo3 = { version = "{{PYO3_VERSION}}", features = ["extension-module"] }
+rayon = "1.0.2"
diff --git a/.template/pre-script.rhai b/.template/pre-script.rhai
new file mode 100644
index 0000000..f059903
--- /dev/null
+++ b/.template/pre-script.rhai
@@ -0,0 +1,4 @@
+variable::set("PYO3_VERSION", "0.20.3");
+file::rename(".template/Cargo.toml", "Cargo.toml");
+file::rename(".template/pyproject.toml", "pyproject.toml");
+file::delete(".template");
diff --git a/.template/pyproject.toml b/.template/pyproject.toml
new file mode 100644
index 0000000..8aa3c95
--- /dev/null
+++ b/.template/pyproject.toml
@@ -0,0 +1,13 @@
+[build-system]
+requires = ["maturin>=1,<2"]
+build-backend = "maturin"
+
+[project]
+name = "{{project-name}}"
+version = "0.1.0"
+
+[project.optional-dependencies]
+dev = ["pytest"]
+
+[tool.pytest.ini_options]
+addopts = "--benchmark-disable"