sampleproject-rs 0.2.3__tar.gz → 0.3.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,28 +2,6 @@
2
2
  # It is not intended for manual editing.
3
3
  version = 4
4
4
 
5
- [[package]]
6
- name = "anstyle"
7
- version = "1.0.11"
8
- source = "registry+https://github.com/rust-lang/crates.io-index"
9
- checksum = "862ed96ca487e809f1c8e5a8447f6ee2cf102f846893800b20cebdf541fc6bbd"
10
-
11
- [[package]]
12
- name = "assert_cmd"
13
- version = "2.0.17"
14
- source = "registry+https://github.com/rust-lang/crates.io-index"
15
- checksum = "2bd389a4b2970a01282ee455294913c0a43724daedcd1a24c3eb0ec1c1320b66"
16
- dependencies = [
17
- "anstyle",
18
- "bstr",
19
- "doc-comment",
20
- "libc",
21
- "predicates",
22
- "predicates-core",
23
- "predicates-tree",
24
- "wait-timeout",
25
- ]
26
-
27
5
  [[package]]
28
6
  name = "autocfg"
29
7
  version = "1.5.0"
@@ -31,27 +9,24 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
31
9
  checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8"
32
10
 
33
11
  [[package]]
34
- name = "bstr"
35
- version = "1.12.0"
36
- source = "registry+https://github.com/rust-lang/crates.io-index"
37
- checksum = "234113d19d0d7d613b40e86fb654acf958910802bcceab913a4f9e7cda03b1a4"
12
+ name = "bindings-wasm"
13
+ version = "0.3.0"
38
14
  dependencies = [
39
- "memchr",
40
- "regex-automata",
41
- "serde",
15
+ "sample-core",
16
+ "wasm-bindgen",
42
17
  ]
43
18
 
44
19
  [[package]]
45
- name = "difflib"
46
- version = "0.4.0"
20
+ name = "bumpalo"
21
+ version = "3.20.3"
47
22
  source = "registry+https://github.com/rust-lang/crates.io-index"
48
- checksum = "6184e33543162437515c2e2b48714794e37845ec9851711914eec9d308f6ebe8"
23
+ checksum = "72f5acc6cb2ba439de613abc23857ec3d78374d8ed5ac84e9d11336e87da8649"
49
24
 
50
25
  [[package]]
51
- name = "doc-comment"
52
- version = "0.3.3"
26
+ name = "cfg-if"
27
+ version = "1.0.4"
53
28
  source = "registry+https://github.com/rust-lang/crates.io-index"
54
- checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10"
29
+ checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801"
55
30
 
56
31
  [[package]]
57
32
  name = "heck"
@@ -71,12 +46,6 @@ version = "0.2.175"
71
46
  source = "registry+https://github.com/rust-lang/crates.io-index"
72
47
  checksum = "6a82ae493e598baaea5209805c49bbf2ea7de956d50d7da0da1164f9c6d28543"
73
48
 
74
- [[package]]
75
- name = "memchr"
76
- version = "2.7.5"
77
- source = "registry+https://github.com/rust-lang/crates.io-index"
78
- checksum = "32a282da65faaf38286cf3be983213fcf1d2e2a58700e808f83f4ea9a4804bc0"
79
-
80
49
  [[package]]
81
50
  name = "memoffset"
82
51
  version = "0.9.1"
@@ -98,33 +67,6 @@ version = "1.11.1"
98
67
  source = "registry+https://github.com/rust-lang/crates.io-index"
99
68
  checksum = "f84267b20a16ea918e43c6a88433c2d54fa145c92a811b5b047ccbe153674483"
100
69
 
101
- [[package]]
102
- name = "predicates"
103
- version = "3.1.3"
104
- source = "registry+https://github.com/rust-lang/crates.io-index"
105
- checksum = "a5d19ee57562043d37e82899fade9a22ebab7be9cef5026b07fda9cdd4293573"
106
- dependencies = [
107
- "anstyle",
108
- "difflib",
109
- "predicates-core",
110
- ]
111
-
112
- [[package]]
113
- name = "predicates-core"
114
- version = "1.0.9"
115
- source = "registry+https://github.com/rust-lang/crates.io-index"
116
- checksum = "727e462b119fe9c93fd0eb1429a5f7647394014cf3c04ab2c0350eeb09095ffa"
117
-
118
- [[package]]
119
- name = "predicates-tree"
120
- version = "1.0.12"
121
- source = "registry+https://github.com/rust-lang/crates.io-index"
122
- checksum = "72dd2d6d381dfb73a193c7fca536518d7caee39fc8503f74e7dc0be0531b425c"
123
- dependencies = [
124
- "predicates-core",
125
- "termtree",
126
- ]
127
-
128
70
  [[package]]
129
71
  name = "proc-macro2"
130
72
  version = "1.0.101"
@@ -179,7 +121,7 @@ dependencies = [
179
121
  "proc-macro2",
180
122
  "pyo3-macros-backend",
181
123
  "quote",
182
- "syn",
124
+ "syn 2.0.106",
183
125
  ]
184
126
 
185
127
  [[package]]
@@ -192,7 +134,7 @@ dependencies = [
192
134
  "proc-macro2",
193
135
  "pyo3-build-config",
194
136
  "quote",
195
- "syn",
137
+ "syn 2.0.106",
196
138
  ]
197
139
 
198
140
  [[package]]
@@ -205,44 +147,39 @@ dependencies = [
205
147
  ]
206
148
 
207
149
  [[package]]
208
- name = "regex-automata"
209
- version = "0.4.10"
150
+ name = "rustversion"
151
+ version = "1.0.23"
210
152
  source = "registry+https://github.com/rust-lang/crates.io-index"
211
- checksum = "6b9458fa0bfeeac22b5ca447c63aaf45f28439a709ccd244698632f9aa6394d6"
153
+ checksum = "cf54715a573b99ac80df0bc206da022bcd442c974952c7b9720069370852e21f"
212
154
 
213
155
  [[package]]
214
- name = "sample"
215
- version = "0.0.1"
216
- dependencies = [
217
- "assert_cmd",
218
- "pyo3",
219
- ]
156
+ name = "sample-core"
157
+ version = "0.3.0"
220
158
 
221
159
  [[package]]
222
- name = "serde"
223
- version = "1.0.219"
224
- source = "registry+https://github.com/rust-lang/crates.io-index"
225
- checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6"
160
+ name = "sample-py"
161
+ version = "0.3.0"
226
162
  dependencies = [
227
- "serde_derive",
163
+ "pyo3",
164
+ "sample-core",
228
165
  ]
229
166
 
230
167
  [[package]]
231
- name = "serde_derive"
232
- version = "1.0.219"
168
+ name = "syn"
169
+ version = "2.0.106"
233
170
  source = "registry+https://github.com/rust-lang/crates.io-index"
234
- checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00"
171
+ checksum = "ede7c438028d4436d71104916910f5bb611972c5cfd7f89b8300a8186e6fada6"
235
172
  dependencies = [
236
173
  "proc-macro2",
237
174
  "quote",
238
- "syn",
175
+ "unicode-ident",
239
176
  ]
240
177
 
241
178
  [[package]]
242
179
  name = "syn"
243
- version = "2.0.106"
180
+ version = "3.0.5"
244
181
  source = "registry+https://github.com/rust-lang/crates.io-index"
245
- checksum = "ede7c438028d4436d71104916910f5bb611972c5cfd7f89b8300a8186e6fada6"
182
+ checksum = "12df2e0110f65b775f769bb17ef989067a1d931b2eb822bd4346631eeada89f9"
246
183
  dependencies = [
247
184
  "proc-macro2",
248
185
  "quote",
@@ -255,12 +192,6 @@ version = "0.13.3"
255
192
  source = "registry+https://github.com/rust-lang/crates.io-index"
256
193
  checksum = "df7f62577c25e07834649fc3b39fafdc597c0a3527dc1c60129201ccfcbaa50c"
257
194
 
258
- [[package]]
259
- name = "termtree"
260
- version = "0.5.1"
261
- source = "registry+https://github.com/rust-lang/crates.io-index"
262
- checksum = "8f50febec83f5ee1df3015341d8bd429f2d1cc62bcba7ea2076759d315084683"
263
-
264
195
  [[package]]
265
196
  name = "unicode-ident"
266
197
  version = "1.0.19"
@@ -274,10 +205,46 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
274
205
  checksum = "7264e107f553ccae879d21fbea1d6724ac785e8c3bfc762137959b5802826ef3"
275
206
 
276
207
  [[package]]
277
- name = "wait-timeout"
278
- version = "0.2.1"
208
+ name = "wasm-bindgen"
209
+ version = "0.2.128"
279
210
  source = "registry+https://github.com/rust-lang/crates.io-index"
280
- checksum = "09ac3b126d3914f9849036f826e054cbabdc8519970b8998ddaf3b5bd3c65f11"
211
+ checksum = "aecb87a33d3b0c5e3b7aa46336eaf486cffafbd281b195e4c8b80d50df2351bf"
281
212
  dependencies = [
282
- "libc",
213
+ "cfg-if",
214
+ "once_cell",
215
+ "rustversion",
216
+ "wasm-bindgen-macro",
217
+ "wasm-bindgen-shared",
218
+ ]
219
+
220
+ [[package]]
221
+ name = "wasm-bindgen-macro"
222
+ version = "0.2.128"
223
+ source = "registry+https://github.com/rust-lang/crates.io-index"
224
+ checksum = "a690d511e3c1a8b3a55e33511e3c2c00c78415cd23650f32b808627f5696b9ed"
225
+ dependencies = [
226
+ "quote",
227
+ "wasm-bindgen-macro-support",
228
+ ]
229
+
230
+ [[package]]
231
+ name = "wasm-bindgen-macro-support"
232
+ version = "0.2.128"
233
+ source = "registry+https://github.com/rust-lang/crates.io-index"
234
+ checksum = "411e4887f0071ef2d2164a9d5fdf2d20efbef78fccd3a78b0c10a1dc5295e48a"
235
+ dependencies = [
236
+ "bumpalo",
237
+ "proc-macro2",
238
+ "quote",
239
+ "syn 3.0.5",
240
+ "wasm-bindgen-shared",
241
+ ]
242
+
243
+ [[package]]
244
+ name = "wasm-bindgen-shared"
245
+ version = "0.2.128"
246
+ source = "registry+https://github.com/rust-lang/crates.io-index"
247
+ checksum = "81941cd78d0c92026c33e5e01312845a4cb1e9af3407f9134b100dd03144103e"
248
+ dependencies = [
249
+ "unicode-ident",
283
250
  ]
@@ -0,0 +1,7 @@
1
+ [workspace]
2
+ members = ["bindings-py", "sample-core"]
3
+ resolver = "2"
4
+
5
+ [workspace.package]
6
+ version = "0.3.0"
7
+ edition = "2024"
@@ -1,16 +1,16 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sampleproject-rs
3
- Version: 0.2.3
3
+ Version: 0.3.0
4
4
  Classifier: Development Status :: 3 - Alpha
5
5
  Classifier: Intended Audience :: Developers
6
6
  Classifier: Topic :: Software Development :: Build Tools
7
- Classifier: License :: OSI Approved :: MIT License
8
7
  Classifier: Programming Language :: Python :: 3
9
8
  Classifier: Programming Language :: Python :: 3.10
10
9
  Classifier: Programming Language :: Python :: 3.11
11
10
  Classifier: Programming Language :: Python :: 3.12
12
11
  Classifier: Programming Language :: Python :: 3.13
13
12
  Classifier: Programming Language :: Python :: 3 :: Only
13
+ Classifier: Programming Language :: Rust
14
14
  Requires-Dist: pytest ; extra == 'test'
15
15
  Provides-Extra: dev
16
16
  Provides-Extra: test
@@ -18,10 +18,11 @@ License-File: LICENSE
18
18
  Summary: A sample Python project from Rust binary
19
19
  Keywords: sample,maturin,development
20
20
  Author-email: ftnext <takuyafjp+develop@gmail.com>
21
+ License-Expression: MIT
21
22
  Requires-Python: >=3.10
22
23
  Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
23
- Project-URL: Homepage, https://github.com/ftnext/sampleproject-rs
24
24
  Project-URL: Bug Reports, https://github.com/ftnext/sampleproject-rs/issues
25
+ Project-URL: Homepage, https://github.com/ftnext/sampleproject-rs
25
26
  Project-URL: Source, https://github.com/ftnext/sampleproject-rs/
26
27
 
27
28
  # A sample Python project from Rust binary
@@ -1,15 +1,12 @@
1
1
  [package]
2
- name = "sample"
3
- version = "0.0.1"
4
- edition = "2024"
5
- readme = "README.md"
2
+ name = "sample-py"
3
+ version.workspace = true
4
+ edition.workspace = true
6
5
 
7
6
  [lib]
8
7
  name = "sample"
9
8
  crate-type = ["cdylib"]
10
9
 
11
10
  [dependencies]
11
+ sample-core = { path = "../sample-core" }
12
12
  pyo3 = { version = "0.26.0", features = ["extension-module", "abi3-py310"] }
13
-
14
- [dev-dependencies]
15
- assert_cmd = "2"
@@ -7,7 +7,7 @@ fn main() {
7
7
 
8
8
  #[pyfunction]
9
9
  fn add_one(number: i32) -> i32 {
10
- number + 1
10
+ sample_core::add_one(number)
11
11
  }
12
12
 
13
13
  #[pymodule]
@@ -23,15 +23,3 @@ mod sample {
23
23
  use super::add_one;
24
24
  }
25
25
  }
26
-
27
- #[cfg(test)]
28
- mod test_add_one {
29
- use super::add_one;
30
-
31
- #[test]
32
- fn 引数に1を加えた数を返す() {
33
- assert_eq!(add_one(1), 2);
34
- assert_eq!(add_one(-1), 0);
35
- assert_eq!(add_one(41), 42);
36
- }
37
- }
@@ -23,7 +23,7 @@ name = "sampleproject-rs" # REQUIRED, is the only field that cannot be marked as
23
23
  #
24
24
  # For a discussion on single-sourcing the version, see
25
25
  # https://packaging.python.org/guides/single-sourcing-package-version/
26
- version = "0.2.3" # REQUIRED, although can be dynamic
26
+ version = "0.3.0" # REQUIRED, although can be dynamic
27
27
 
28
28
  # This is a one-line description or tagline of what your project does. This
29
29
  # corresponds to the "Summary" metadata field:
@@ -49,7 +49,8 @@ requires-python = ">=3.10"
49
49
  # This is either text indicating the license for the distribution, or a file
50
50
  # that contains the license.
51
51
  # https://packaging.python.org/en/latest/specifications/core-metadata/#license
52
- license = { file = "LICENSE" }
52
+ license = "MIT"
53
+ license-files = ["LICENSE"]
53
54
 
54
55
  # This field adds keywords for your project which will appear on the
55
56
  # project page. What does your project relate to?
@@ -83,9 +84,6 @@ classifiers = [
83
84
  "Intended Audience :: Developers",
84
85
  "Topic :: Software Development :: Build Tools",
85
86
 
86
- # Pick your license as you wish
87
- "License :: OSI Approved :: MIT License",
88
-
89
87
  # Specify the Python versions you support here. In particular, ensure
90
88
  # that you indicate you support Python 3. These classifiers are *not*
91
89
  # checked by "pip install". See instead "requires-python" key in this file.
@@ -95,6 +93,7 @@ classifiers = [
95
93
  "Programming Language :: Python :: 3.12",
96
94
  "Programming Language :: Python :: 3.13",
97
95
  "Programming Language :: Python :: 3 :: Only",
96
+ "Programming Language :: Rust",
98
97
  ]
99
98
 
100
99
  # This field lists other packages that your project depends on to run.
@@ -143,3 +142,4 @@ sample = "sample:main"
143
142
  # If you are using a different build backend, you will need to change this.
144
143
  [tool.maturin]
145
144
  bindings = "pyo3"
145
+ manifest-path = "bindings-py/Cargo.toml"
@@ -0,0 +1,7 @@
1
+ [package]
2
+ name = "sample-core"
3
+ version.workspace = true
4
+ edition.workspace = true
5
+
6
+ [lib]
7
+ name = "sample_core"
@@ -0,0 +1,15 @@
1
+ pub fn add_one(number: i32) -> i32 {
2
+ number + 1
3
+ }
4
+
5
+ #[cfg(test)]
6
+ mod test_add_one {
7
+ use super::add_one;
8
+
9
+ #[test]
10
+ fn 引数に1を加えた数を返す() {
11
+ assert_eq!(add_one(1), 2);
12
+ assert_eq!(add_one(-1), 0);
13
+ assert_eq!(add_one(41), 42);
14
+ }
15
+ }
@@ -1,151 +0,0 @@
1
- # Based on `maturin generate-ci github`
2
- name: Publish Python Package
3
-
4
- on:
5
- release:
6
- types:
7
- - published
8
-
9
- permissions:
10
- contents: read
11
-
12
- jobs:
13
- sdist:
14
- runs-on: ubuntu-latest
15
- steps:
16
- - uses: actions/checkout@v5
17
- - uses: PyO3/maturin-action@v1
18
- with:
19
- command: sdist
20
- args: --out dist
21
- - name: Check package
22
- run: |
23
- pipx run twine check dist/*
24
- - uses: actions/upload-artifact@v4
25
- with:
26
- name: pypi-files-sdist
27
- path: dist
28
- linux:
29
- runs-on: ${{ matrix.platform.runner }}
30
- strategy:
31
- matrix:
32
- platform:
33
- - runner: ubuntu-22.04
34
- target: x86_64
35
- - runner: ubuntu-22.04
36
- target: x86
37
- - runner: ubuntu-22.04
38
- target: aarch64
39
- - runner: ubuntu-22.04
40
- target: armv7
41
- - runner: ubuntu-22.04
42
- target: s390x
43
- - runner: ubuntu-22.04
44
- target: ppc64le
45
- steps:
46
- - uses: actions/checkout@v5
47
- - uses: PyO3/maturin-action@v1
48
- with:
49
- target: ${{ matrix.platform.target}}
50
- args: --release --out dist
51
- manylinux: auto
52
- - name: Check
53
- run: |
54
- pipx run twine check dist/*
55
- - uses: actions/upload-artifact@v4
56
- with:
57
- name: pypi-files-linux-${{ matrix.platform.target }}
58
- path: dist
59
- musllinux:
60
- runs-on: ${{ matrix.platform.runner }}
61
- strategy:
62
- matrix:
63
- platform:
64
- - runner: ubuntu-22.04
65
- target: x86_64
66
- - runner: ubuntu-22.04
67
- target: x86
68
- - runner: ubuntu-22.04
69
- target: aarch64
70
- - runner: ubuntu-22.04
71
- target: armv7
72
- steps:
73
- - uses: actions/checkout@v5
74
- - uses: PyO3/maturin-action@v1
75
- with:
76
- target: ${{ matrix.platform.target }}
77
- args: --release --out dist
78
- manylinux: musllinux_1_2
79
- - name: Check
80
- run: |
81
- pipx run twine check dist/*
82
- - uses: actions/upload-artifact@v4
83
- with:
84
- name: pypi-files-musllinux-${{ matrix.platform.target }}
85
- path: dist
86
- macos:
87
- runs-on: ${{ matrix.platform.runner }}
88
- strategy:
89
- matrix:
90
- platform:
91
- - runner: macos-15-intel
92
- target: x86_64
93
- - runner: macos-15
94
- target: aarch64
95
- steps:
96
- - uses: actions/checkout@v5
97
- - uses: PyO3/maturin-action@v1
98
- with:
99
- target: ${{ matrix.platform.target }}
100
- args: --release --out dist
101
- - name: Check
102
- run: |
103
- pipx run twine check dist/*
104
- - uses: actions/upload-artifact@v4
105
- with:
106
- name: pypi-files-macos-${{ matrix.platform.target }}
107
- path: dist
108
- windows:
109
- runs-on: ${{ matrix.platform.runner }}
110
- strategy:
111
- matrix:
112
- platform:
113
- - runner: windows-latest
114
- target: x64
115
- - runner: windows-latest
116
- target: x86
117
- steps:
118
- - uses: actions/checkout@v5
119
- - uses: actions/setup-python@v6
120
- with:
121
- python-version: '3.13'
122
- architecture: ${{ matrix.platform.target }}
123
- - uses: PyO3/maturin-action@v1
124
- with:
125
- target: ${{ matrix.platform.target }}
126
- args: --release --out dist
127
- - name: Check
128
- run: |
129
- pipx run twine check dist/*
130
- - uses: actions/upload-artifact@v4
131
- with:
132
- name: pypi-files-windows-${{ matrix.platform.target }}
133
- path: dist
134
-
135
- publish:
136
- needs: [sdist, linux, musllinux, macos, windows]
137
- runs-on: ubuntu-latest
138
- environment: pypi
139
- permissions:
140
- id-token: write
141
-
142
- steps:
143
- - uses: actions/download-artifact@v5
144
- with:
145
- pattern: pypi-files-*
146
- path: dist
147
- merge-multiple: true
148
- - name: Debug information
149
- run: ls -lah dist/
150
- - name: Publish package
151
- uses: pypa/gh-action-pypi-publish@release/v1
@@ -1,99 +0,0 @@
1
- name: Run tests
2
-
3
- on: [push]
4
-
5
- concurrency:
6
- group: ${{ github.workflow }}-${{ github.sha }}
7
- cancel-in-progress: true
8
-
9
- jobs:
10
- rust:
11
- name: cargo test on ${{ matrix.os }}
12
- runs-on: ${{ matrix.os }}
13
- strategy:
14
- matrix:
15
- os: [ubuntu-latest, macos-latest, windows-latest]
16
- steps:
17
- - uses: actions/checkout@v5
18
- - uses: actions-rust-lang/setup-rust-toolchain@v1
19
- - uses: actions/setup-python@v6
20
- with:
21
- python-version: '3.13'
22
- - run: python -V
23
- - run: cargo test --all-features
24
-
25
- python:
26
- needs: rust
27
- name: pytest on ${{ matrix.os }}
28
- runs-on: ${{ matrix.os }}
29
- strategy:
30
- matrix:
31
- os: [ubuntu-latest, macos-latest, windows-latest]
32
- steps:
33
- - uses: actions/checkout@v5
34
- - uses: actions/setup-python@v6
35
- with:
36
- python-version: '3.13'
37
- - name: Install (Linux / macOS)
38
- if: ${{ ! startsWith(matrix.os, 'windows') }}
39
- run: |
40
- python -m venv .venv --upgrade-deps
41
- source .venv/bin/activate
42
- pipx run maturin develop -E test
43
- - name: Install (Windows)
44
- if: startsWith(matrix.os, 'windows')
45
- run: |
46
- python -m venv .venv --upgrade-deps
47
- .venv\Scripts\activate
48
- pipx run maturin develop -E test
49
- - name: Run tests (Linux / macOS)
50
- if: ${{ ! startsWith(matrix.os, 'windows') }}
51
- run: |
52
- source .venv/bin/activate
53
- pytest
54
- - name: Run tests (Windows)
55
- if: startsWith(matrix.os, 'windows')
56
- run: |
57
- .venv\Scripts\activate
58
- pytest
59
-
60
- linux-build:
61
- needs: [rust, python]
62
- name: Test build (Ubuntu)
63
- runs-on: ubuntu-latest
64
- steps:
65
- - uses: actions/checkout@v5
66
- - uses: PyO3/maturin-action@v1
67
- with:
68
- target: x86_64
69
- args: --release --out dist
70
- manylinux: auto
71
-
72
- macos-build:
73
- needs: [rust, python]
74
- name: Test build (macOS)
75
- runs-on: macos-latest
76
- steps:
77
- - uses: actions/checkout@v5
78
- - uses: PyO3/maturin-action@v1
79
- with:
80
- target: aarch64
81
- args: --release --out dist
82
-
83
- windows-build:
84
- needs: [rust, python]
85
- name: Test build (Windows) target=${{ matrix.arch }}
86
- runs-on: windows-latest
87
- strategy:
88
- matrix:
89
- arch: [x86, x64]
90
- steps:
91
- - uses: actions/checkout@v5
92
- - uses: actions/setup-python@v6
93
- with:
94
- python-version: '3.13'
95
- architecture: ${{ matrix.arch }}
96
- - uses: PyO3/maturin-action@v1
97
- with:
98
- target: ${{ matrix.arch }}
99
- args: --release --out dist
@@ -1,242 +0,0 @@
1
- ### https://github.com/github/gitignore/blob/main/Rust.gitignore ###
2
- # Generated by Cargo
3
- # will have compiled files and executables
4
- debug
5
- target
6
-
7
- # These are backup files generated by rustfmt
8
- **/*.rs.bk
9
-
10
- # MSVC Windows builds of rustc generate these, which store debugging information
11
- *.pdb
12
-
13
- # Generated by cargo mutants
14
- # Contains mutation testing data
15
- **/mutants.out*/
16
-
17
- # RustRover
18
- # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
19
- # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
20
- # and can be added to the global gitignore or merged into this file. For a more nuclear
21
- # option (not recommended) you can uncomment the following to ignore the entire idea folder.
22
- #.idea/
23
- ### End of Rust.gitignore ###
24
-
25
- ### https://github.com/github/gitignore/blob/main/Python.gitignore ###
26
- # Byte-compiled / optimized / DLL files
27
- __pycache__/
28
- *.py[codz]
29
- *$py.class
30
-
31
- # C extensions
32
- *.so
33
-
34
- # Distribution / packaging
35
- .Python
36
- build/
37
- develop-eggs/
38
- dist/
39
- downloads/
40
- eggs/
41
- .eggs/
42
- lib/
43
- lib64/
44
- parts/
45
- sdist/
46
- var/
47
- wheels/
48
- share/python-wheels/
49
- *.egg-info/
50
- .installed.cfg
51
- *.egg
52
- MANIFEST
53
-
54
- # PyInstaller
55
- # Usually these files are written by a python script from a template
56
- # before PyInstaller builds the exe, so as to inject date/other infos into it.
57
- *.manifest
58
- *.spec
59
-
60
- # Installer logs
61
- pip-log.txt
62
- pip-delete-this-directory.txt
63
-
64
- # Unit test / coverage reports
65
- htmlcov/
66
- .tox/
67
- .nox/
68
- .coverage
69
- .coverage.*
70
- .cache
71
- nosetests.xml
72
- coverage.xml
73
- *.cover
74
- *.py.cover
75
- .hypothesis/
76
- .pytest_cache/
77
- cover/
78
-
79
- # Translations
80
- *.mo
81
- *.pot
82
-
83
- # Django stuff:
84
- *.log
85
- local_settings.py
86
- db.sqlite3
87
- db.sqlite3-journal
88
-
89
- # Flask stuff:
90
- instance/
91
- .webassets-cache
92
-
93
- # Scrapy stuff:
94
- .scrapy
95
-
96
- # Sphinx documentation
97
- docs/_build/
98
-
99
- # PyBuilder
100
- .pybuilder/
101
- target/
102
-
103
- # Jupyter Notebook
104
- .ipynb_checkpoints
105
-
106
- # IPython
107
- profile_default/
108
- ipython_config.py
109
-
110
- # pyenv
111
- # For a library or package, you might want to ignore these files since the code is
112
- # intended to run in multiple environments; otherwise, check them in:
113
- # .python-version
114
-
115
- # pipenv
116
- # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
117
- # However, in case of collaboration, if having platform-specific dependencies or dependencies
118
- # having no cross-platform support, pipenv may install dependencies that don't work, or not
119
- # install all needed dependencies.
120
- #Pipfile.lock
121
-
122
- # UV
123
- # Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
124
- # This is especially recommended for binary packages to ensure reproducibility, and is more
125
- # commonly ignored for libraries.
126
- #uv.lock
127
-
128
- # poetry
129
- # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
130
- # This is especially recommended for binary packages to ensure reproducibility, and is more
131
- # commonly ignored for libraries.
132
- # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
133
- #poetry.lock
134
- #poetry.toml
135
-
136
- # pdm
137
- # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
138
- # pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
139
- # https://pdm-project.org/en/latest/usage/project/#working-with-version-control
140
- #pdm.lock
141
- #pdm.toml
142
- .pdm-python
143
- .pdm-build/
144
-
145
- # pixi
146
- # Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
147
- #pixi.lock
148
- # Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
149
- # in the .venv directory. It is recommended not to include this directory in version control.
150
- .pixi
151
-
152
- # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
153
- __pypackages__/
154
-
155
- # Celery stuff
156
- celerybeat-schedule
157
- celerybeat.pid
158
-
159
- # Redis
160
- *.rdb
161
- *.aof
162
- *.pid
163
-
164
- # RabbitMQ
165
- mnesia/
166
- rabbitmq/
167
- rabbitmq-data/
168
-
169
- # ActiveMQ
170
- activemq-data/
171
-
172
- # SageMath parsed files
173
- *.sage.py
174
-
175
- # Environments
176
- .env
177
- .envrc
178
- .venv
179
- env/
180
- venv/
181
- ENV/
182
- env.bak/
183
- venv.bak/
184
-
185
- # Spyder project settings
186
- .spyderproject
187
- .spyproject
188
-
189
- # Rope project settings
190
- .ropeproject
191
-
192
- # mkdocs documentation
193
- /site
194
-
195
- # mypy
196
- .mypy_cache/
197
- .dmypy.json
198
- dmypy.json
199
-
200
- # Pyre type checker
201
- .pyre/
202
-
203
- # pytype static type analyzer
204
- .pytype/
205
-
206
- # Cython debug symbols
207
- cython_debug/
208
-
209
- # PyCharm
210
- # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
211
- # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
212
- # and can be added to the global gitignore or merged into this file. For a more nuclear
213
- # option (not recommended) you can uncomment the following to ignore the entire idea folder.
214
- #.idea/
215
-
216
- # Abstra
217
- # Abstra is an AI-powered process automation framework.
218
- # Ignore directories containing user credentials, local state, and settings.
219
- # Learn more at https://abstra.io/docs
220
- .abstra/
221
-
222
- # Visual Studio Code
223
- # Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
224
- # that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
225
- # and can be added to the global gitignore or merged into this file. However, if you prefer,
226
- # you could uncomment the following to ignore the entire vscode folder
227
- # .vscode/
228
-
229
- # Ruff stuff:
230
- .ruff_cache/
231
-
232
- # PyPI configuration file
233
- .pypirc
234
-
235
- # Marimo
236
- marimo/_static/
237
- marimo/_lsp/
238
- __marimo__/
239
-
240
- # Streamlit
241
- .streamlit/secrets.toml
242
- ### End of Python.gitignore ###
@@ -1,3 +0,0 @@
1
- fn main() {
2
- println!("Call your main application code here");
3
- }
@@ -1,8 +0,0 @@
1
- use assert_cmd::Command;
2
-
3
- #[test]
4
- fn test_cli() {
5
- let mut cmd = Command::cargo_bin("sample").unwrap();
6
- let assert = cmd.assert();
7
- assert.success().stdout("Call your main application code here\n");
8
- }
@@ -1,12 +0,0 @@
1
- import subprocess
2
-
3
-
4
- def test_add_one():
5
- from sample import simple
6
-
7
- assert simple.add_one(20) == 21
8
-
9
-
10
- def test_sample_command():
11
- result = subprocess.run(["sample"], capture_output=True, text=True, check=True)
12
- assert result.stdout == "Call your main application code here\n"