Skip to content

Commit e90228c

Browse files
committed
Migrate the hello-world-script example to a 'rust' dir
1 parent f9fb03e commit e90228c

File tree

4 files changed

+13
-2
lines changed

4 files changed

+13
-2
lines changed

examples/hello-world-script/Cargo.toml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,15 @@ edition = "2018"
1010
[profile.release-lto]
1111
inherits = "release"
1212
lto = true
13+
14+
[[bin]]
15+
name = "hello-world-script"
16+
path = "rust/main.rs"
17+
# See https://doc.rust-lang.org/cargo/reference/cargo-targets.html#binaries
18+
#
19+
# If [[bin]] is not specified, but the file ``src/main.rs`` exists,
20+
# you can also rely on an implicit definition which will behave similarly to:
21+
#
22+
# [[bin]]
23+
# name = <package.name>
24+
# path = "src/main.rs"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
include Cargo.toml
2-
recursive-include src *
2+
recursive-include rust *
33
recursive-include python *

examples/hello-world-script/pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,5 @@ find = { where = ["python"] }
1313
[[tool.setuptools-rust.bins]]
1414
# Private Rust extension module to be nested into Python package
1515
target = "hello-world-script" # Matches bin.name in Cargo.toml
16-
# (or package.name if [[bin]] is missing and src/main.rs exists)
1716
args = ["--profile", "release-lto"] # Extra args for Cargo
1817
# See reference for RustBin in https://setuptools-rust.readthedocs.io/en/latest/reference.html

0 commit comments

Comments
 (0)