Skip to content

Commit ccfa721

Browse files
committed
feat: add build-rust as a nox session
1 parent 1781c8f commit ccfa721

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

{{cookiecutter.project_name}}/noxfile.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,15 @@ def build_python(session: Session) -> None:
218218
session.log(f"- {path.name}")
219219

220220

221+
{% if cookiecutter.add_rust_extension -%}
222+
@nox.session(python=False, name="build-rust", tags=[BUILD, RUST])
223+
def build_rust(session: Session) -> None:
224+
"""Build standalone Rust crates for potential independent publishing."""
225+
session.log("Building Rust crates...")
226+
session.run("cargo", "build", "--release", "--manifest-path", "rust/Cargo.toml", external=True)
227+
228+
229+
{% endif -%}
221230
@nox.session(python=False, name="build-container", tags=[BUILD])
222231
def build_container(session: Session) -> None:
223232
"""Build the Docker container image.

0 commit comments

Comments
 (0)