statsx 0.1.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.
- statsx-0.1.0/LICENSE +21 -0
- statsx-0.1.0/PKG-INFO +81 -0
- statsx-0.1.0/README.md +53 -0
- statsx-0.1.0/pyproject.toml +101 -0
- statsx-0.1.0/rust/Cargo.lock +180 -0
- statsx-0.1.0/rust/Cargo.toml +28 -0
- statsx-0.1.0/rust/src/lib.rs +14 -0
- statsx-0.1.0/src/statsx/__init__.py +1 -0
- statsx-0.1.0/src/statsx/py.typed +0 -0
statsx-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Jorge Cardona
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
statsx-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: statsx
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Classifier: Development Status :: 4 - Beta
|
|
5
|
+
Classifier: Intended Audience :: Developers
|
|
6
|
+
Classifier: Programming Language :: Python :: 3
|
|
7
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
8
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
9
|
+
Classifier: Topic :: Software Development :: Libraries
|
|
10
|
+
Classifier: Typing :: Typed
|
|
11
|
+
Requires-Dist: mkdocs>=1.6 ; extra == 'docs'
|
|
12
|
+
Requires-Dist: mkdocs-material>=9.5 ; extra == 'docs'
|
|
13
|
+
Requires-Dist: mkdocstrings[python]>=0.27 ; extra == 'docs'
|
|
14
|
+
Provides-Extra: docs
|
|
15
|
+
License-File: LICENSE
|
|
16
|
+
Summary: Statistics for Python with its own Rust core: Bayesian inference, forecasting, causal impact, tests and design, with NumPy as the only dependency.
|
|
17
|
+
Keywords:
|
|
18
|
+
Author-email: Jorge Cardona <jorgeecardona@gmail.com>
|
|
19
|
+
License-Expression: MIT
|
|
20
|
+
Requires-Python: >=3.12
|
|
21
|
+
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
|
|
22
|
+
Project-URL: Changelog, https://gitlab.com/cardona-oss/statsx/-/blob/main/CHANGELOG.md
|
|
23
|
+
Project-URL: Documentation, https://cardona-oss.gitlab.io/statsx/
|
|
24
|
+
Project-URL: Homepage, https://gitlab.com/cardona-oss/statsx
|
|
25
|
+
Project-URL: Issues, https://gitlab.com/cardona-oss/statsx/-/issues
|
|
26
|
+
Project-URL: Repository, https://gitlab.com/cardona-oss/statsx
|
|
27
|
+
|
|
28
|
+
# statsx
|
|
29
|
+
|
|
30
|
+
[](https://gitlab.com/cardona-oss/statsx/-/pipelines)
|
|
31
|
+
[](https://pypi.org/project/statsx/)
|
|
32
|
+
[](https://pypi.org/project/statsx/)
|
|
33
|
+
[](https://gitlab.com/cardona-oss/statsx/-/blob/main/LICENSE)
|
|
34
|
+
|
|
35
|
+
Statistics for Python with its own Rust core: Bayesian inference, forecasting, causal impact, tests and design, with NumPy as the only dependency.
|
|
36
|
+
|
|
37
|
+
## Install
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
pip install statsx
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Requires Python 3.12+.
|
|
44
|
+
|
|
45
|
+
## Quickstart
|
|
46
|
+
|
|
47
|
+
```python
|
|
48
|
+
import statsx
|
|
49
|
+
|
|
50
|
+
# ...
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Why statsx
|
|
54
|
+
|
|
55
|
+
One short paragraph: the problem statsx solves and who it is for. What makes it a
|
|
56
|
+
better choice than the obvious alternative.
|
|
57
|
+
|
|
58
|
+
## Key features
|
|
59
|
+
|
|
60
|
+
- ...
|
|
61
|
+
- ...
|
|
62
|
+
- ...
|
|
63
|
+
|
|
64
|
+
## Links
|
|
65
|
+
|
|
66
|
+
- **Documentation:** https://cardona-oss.gitlab.io/statsx/
|
|
67
|
+
- **Source:** https://gitlab.com/cardona-oss/statsx
|
|
68
|
+
- **Issues:** https://gitlab.com/cardona-oss/statsx/-/issues
|
|
69
|
+
- **PyPI:** https://pypi.org/project/statsx/
|
|
70
|
+
- **Changelog:** [CHANGELOG.md](https://gitlab.com/cardona-oss/statsx/-/blob/main/CHANGELOG.md)
|
|
71
|
+
|
|
72
|
+
## Contributing
|
|
73
|
+
|
|
74
|
+
Developer setup, the dev loop, and the release process live in
|
|
75
|
+
[CONTRIBUTING.md](https://gitlab.com/cardona-oss/statsx/-/blob/main/CONTRIBUTING.md). In short: `uv sync && make install-hooks`, then
|
|
76
|
+
`make check` runs the same gate CI runs.
|
|
77
|
+
|
|
78
|
+
## License
|
|
79
|
+
|
|
80
|
+
MIT © 2026 Jorge Cardona (see [LICENSE](https://gitlab.com/cardona-oss/statsx/-/blob/main/LICENSE)).
|
|
81
|
+
|
statsx-0.1.0/README.md
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# statsx
|
|
2
|
+
|
|
3
|
+
[](https://gitlab.com/cardona-oss/statsx/-/pipelines)
|
|
4
|
+
[](https://pypi.org/project/statsx/)
|
|
5
|
+
[](https://pypi.org/project/statsx/)
|
|
6
|
+
[](https://gitlab.com/cardona-oss/statsx/-/blob/main/LICENSE)
|
|
7
|
+
|
|
8
|
+
Statistics for Python with its own Rust core: Bayesian inference, forecasting, causal impact, tests and design, with NumPy as the only dependency.
|
|
9
|
+
|
|
10
|
+
## Install
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
pip install statsx
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Requires Python 3.12+.
|
|
17
|
+
|
|
18
|
+
## Quickstart
|
|
19
|
+
|
|
20
|
+
```python
|
|
21
|
+
import statsx
|
|
22
|
+
|
|
23
|
+
# ...
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Why statsx
|
|
27
|
+
|
|
28
|
+
One short paragraph: the problem statsx solves and who it is for. What makes it a
|
|
29
|
+
better choice than the obvious alternative.
|
|
30
|
+
|
|
31
|
+
## Key features
|
|
32
|
+
|
|
33
|
+
- ...
|
|
34
|
+
- ...
|
|
35
|
+
- ...
|
|
36
|
+
|
|
37
|
+
## Links
|
|
38
|
+
|
|
39
|
+
- **Documentation:** https://cardona-oss.gitlab.io/statsx/
|
|
40
|
+
- **Source:** https://gitlab.com/cardona-oss/statsx
|
|
41
|
+
- **Issues:** https://gitlab.com/cardona-oss/statsx/-/issues
|
|
42
|
+
- **PyPI:** https://pypi.org/project/statsx/
|
|
43
|
+
- **Changelog:** [CHANGELOG.md](https://gitlab.com/cardona-oss/statsx/-/blob/main/CHANGELOG.md)
|
|
44
|
+
|
|
45
|
+
## Contributing
|
|
46
|
+
|
|
47
|
+
Developer setup, the dev loop, and the release process live in
|
|
48
|
+
[CONTRIBUTING.md](https://gitlab.com/cardona-oss/statsx/-/blob/main/CONTRIBUTING.md). In short: `uv sync && make install-hooks`, then
|
|
49
|
+
`make check` runs the same gate CI runs.
|
|
50
|
+
|
|
51
|
+
## License
|
|
52
|
+
|
|
53
|
+
MIT © 2026 Jorge Cardona (see [LICENSE](https://gitlab.com/cardona-oss/statsx/-/blob/main/LICENSE)).
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "statsx"
|
|
3
|
+
version = "0.1.0" # static: maturin is the build backend (it cannot read __version__ from a Python file; it reads Cargo.toml or this line). Keep in sync with rust/Cargo.toml.
|
|
4
|
+
description = "Statistics for Python with its own Rust core: Bayesian inference, forecasting, causal impact, tests and design, with NumPy as the only dependency."
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
requires-python = ">=3.12"
|
|
7
|
+
license = "MIT"
|
|
8
|
+
license-files = ["LICENSE"]
|
|
9
|
+
authors = [{ name = "Jorge Cardona", email = "jorgeecardona@gmail.com" }]
|
|
10
|
+
keywords = []
|
|
11
|
+
classifiers = [
|
|
12
|
+
"Development Status :: 4 - Beta",
|
|
13
|
+
"Intended Audience :: Developers",
|
|
14
|
+
"Programming Language :: Python :: 3",
|
|
15
|
+
"Programming Language :: Python :: 3.12",
|
|
16
|
+
"Programming Language :: Python :: 3.13",
|
|
17
|
+
"Topic :: Software Development :: Libraries",
|
|
18
|
+
"Typing :: Typed",
|
|
19
|
+
]
|
|
20
|
+
dependencies = []
|
|
21
|
+
|
|
22
|
+
[project.optional-dependencies]
|
|
23
|
+
# docs are an *extra* (not a uv dependency-group) so Read the Docs can install them via pip
|
|
24
|
+
docs = [
|
|
25
|
+
"mkdocs>=1.6",
|
|
26
|
+
"mkdocs-material>=9.5",
|
|
27
|
+
"mkdocstrings[python]>=0.27",
|
|
28
|
+
]
|
|
29
|
+
|
|
30
|
+
[project.urls]
|
|
31
|
+
Homepage = "https://gitlab.com/cardona-oss/statsx"
|
|
32
|
+
Repository = "https://gitlab.com/cardona-oss/statsx"
|
|
33
|
+
Documentation = "https://cardona-oss.gitlab.io/statsx/"
|
|
34
|
+
Changelog = "https://gitlab.com/cardona-oss/statsx/-/blob/main/CHANGELOG.md"
|
|
35
|
+
Issues = "https://gitlab.com/cardona-oss/statsx/-/issues"
|
|
36
|
+
|
|
37
|
+
[build-system]
|
|
38
|
+
requires = ["maturin>=1.5,<2"]
|
|
39
|
+
build-backend = "maturin"
|
|
40
|
+
|
|
41
|
+
# Mixed layout: the Python package is src/statsx/, and the Rust extension is
|
|
42
|
+
# built from rust/Cargo.toml as the statsx._accel submodule and shipped in the
|
|
43
|
+
# same wheel. The pyo3 abi3-py311 feature makes it ONE wheel per platform for Python 3.11+.
|
|
44
|
+
[tool.maturin]
|
|
45
|
+
manifest-path = "rust/Cargo.toml"
|
|
46
|
+
python-source = "src"
|
|
47
|
+
module-name = "statsx._accel"
|
|
48
|
+
features = ["pyo3/extension-module"]
|
|
49
|
+
|
|
50
|
+
[dependency-groups]
|
|
51
|
+
dev = ["ruff>=0.6", "pyright>=1.1.390", "pytest>=8"]
|
|
52
|
+
|
|
53
|
+
[tool.pytest.ini_options]
|
|
54
|
+
testpaths = ["tests"]
|
|
55
|
+
addopts = "-q"
|
|
56
|
+
|
|
57
|
+
[tool.ruff]
|
|
58
|
+
line-length = 100
|
|
59
|
+
target-version = "py312"
|
|
60
|
+
src = ["src", "tests"]
|
|
61
|
+
|
|
62
|
+
[tool.ruff.lint]
|
|
63
|
+
select = ["ALL"]
|
|
64
|
+
# The canonical base ignore list shared across the oss/ libraries. E501 (line length) is handled by
|
|
65
|
+
# the formatter; COM812/ISC001 conflict with the formatter; D1/D401 relax docstring presence/mood;
|
|
66
|
+
# TRY003/EM101/EM102 allow inline exception messages; CPY001 drops the copyright-header demand;
|
|
67
|
+
# PLC0415 allows non-top-level imports; TC001/TC002/TC003 don't force type-only import blocks.
|
|
68
|
+
ignore = [
|
|
69
|
+
"E501",
|
|
70
|
+
"COM812",
|
|
71
|
+
"ISC001",
|
|
72
|
+
"D1",
|
|
73
|
+
"D401",
|
|
74
|
+
"TRY003",
|
|
75
|
+
"EM101",
|
|
76
|
+
"EM102",
|
|
77
|
+
"CPY001",
|
|
78
|
+
"PLC0415",
|
|
79
|
+
"TC001",
|
|
80
|
+
"TC002",
|
|
81
|
+
"TC003",
|
|
82
|
+
]
|
|
83
|
+
|
|
84
|
+
[tool.ruff.lint.pydocstyle]
|
|
85
|
+
convention = "pep257"
|
|
86
|
+
|
|
87
|
+
[tool.ruff.lint.per-file-ignores]
|
|
88
|
+
# Tests may assert (S101), use magic values (PLR2004), take unused fixtures (ARG), pass Any to typed
|
|
89
|
+
# calls (ANN401), and group assertions pytest would otherwise split (PT018).
|
|
90
|
+
"tests/**/*.py" = ["S101", "PLR2004", "ARG", "ANN401", "PT018"]
|
|
91
|
+
|
|
92
|
+
[tool.ruff.lint.isort]
|
|
93
|
+
known-first-party = ["statsx"]
|
|
94
|
+
|
|
95
|
+
[tool.pyright]
|
|
96
|
+
include = ["src", "tests"]
|
|
97
|
+
extraPaths = ["src"]
|
|
98
|
+
pythonVersion = "3.12"
|
|
99
|
+
typeCheckingMode = "strict"
|
|
100
|
+
venvPath = "."
|
|
101
|
+
venv = ".venv"
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
# This file is automatically @generated by Cargo.
|
|
2
|
+
# It is not intended for manual editing.
|
|
3
|
+
version = 4
|
|
4
|
+
|
|
5
|
+
[[package]]
|
|
6
|
+
name = "autocfg"
|
|
7
|
+
version = "1.5.1"
|
|
8
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
9
|
+
checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53"
|
|
10
|
+
|
|
11
|
+
[[package]]
|
|
12
|
+
name = "cfg-if"
|
|
13
|
+
version = "1.0.5"
|
|
14
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
15
|
+
checksum = "4e7648175b45a9a48536d676f68d918270699102aa8dab5496df06904c914600"
|
|
16
|
+
|
|
17
|
+
[[package]]
|
|
18
|
+
name = "heck"
|
|
19
|
+
version = "0.5.0"
|
|
20
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
21
|
+
checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
|
|
22
|
+
|
|
23
|
+
[[package]]
|
|
24
|
+
name = "indoc"
|
|
25
|
+
version = "2.0.8"
|
|
26
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
27
|
+
checksum = "a37b2691796cffeb8a8cd305ac66e65841559f147f4e63231d0eafa4db5384d1"
|
|
28
|
+
dependencies = [
|
|
29
|
+
"rustversion",
|
|
30
|
+
]
|
|
31
|
+
|
|
32
|
+
[[package]]
|
|
33
|
+
name = "libc"
|
|
34
|
+
version = "0.2.191"
|
|
35
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
36
|
+
checksum = "65cd87c9a6d60536580b316ad985726104730a5151c99845f2490428ef91240a"
|
|
37
|
+
|
|
38
|
+
[[package]]
|
|
39
|
+
name = "memoffset"
|
|
40
|
+
version = "0.9.1"
|
|
41
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
42
|
+
checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a"
|
|
43
|
+
dependencies = [
|
|
44
|
+
"autocfg",
|
|
45
|
+
]
|
|
46
|
+
|
|
47
|
+
[[package]]
|
|
48
|
+
name = "once_cell"
|
|
49
|
+
version = "1.21.4"
|
|
50
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
51
|
+
checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50"
|
|
52
|
+
|
|
53
|
+
[[package]]
|
|
54
|
+
name = "portable-atomic"
|
|
55
|
+
version = "1.15.0"
|
|
56
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
57
|
+
checksum = "05c8b63e8d9609db387f0324918f81d68fe27748f084ef092fb35954d0539a85"
|
|
58
|
+
|
|
59
|
+
[[package]]
|
|
60
|
+
name = "proc-macro2"
|
|
61
|
+
version = "1.0.107"
|
|
62
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
63
|
+
checksum = "985e7ec9bb745e6ce6535b544d84d6cd6f7ad8bd711c398938ae983b91a766d9"
|
|
64
|
+
dependencies = [
|
|
65
|
+
"unicode-ident",
|
|
66
|
+
]
|
|
67
|
+
|
|
68
|
+
[[package]]
|
|
69
|
+
name = "pyo3"
|
|
70
|
+
version = "0.22.6"
|
|
71
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
72
|
+
checksum = "f402062616ab18202ae8319da13fa4279883a2b8a9d9f83f20dbade813ce1884"
|
|
73
|
+
dependencies = [
|
|
74
|
+
"cfg-if",
|
|
75
|
+
"indoc",
|
|
76
|
+
"libc",
|
|
77
|
+
"memoffset",
|
|
78
|
+
"once_cell",
|
|
79
|
+
"portable-atomic",
|
|
80
|
+
"pyo3-build-config",
|
|
81
|
+
"pyo3-ffi",
|
|
82
|
+
"pyo3-macros",
|
|
83
|
+
"unindent",
|
|
84
|
+
]
|
|
85
|
+
|
|
86
|
+
[[package]]
|
|
87
|
+
name = "pyo3-build-config"
|
|
88
|
+
version = "0.22.6"
|
|
89
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
90
|
+
checksum = "b14b5775b5ff446dd1056212d778012cbe8a0fbffd368029fd9e25b514479c38"
|
|
91
|
+
dependencies = [
|
|
92
|
+
"once_cell",
|
|
93
|
+
"target-lexicon",
|
|
94
|
+
]
|
|
95
|
+
|
|
96
|
+
[[package]]
|
|
97
|
+
name = "pyo3-ffi"
|
|
98
|
+
version = "0.22.6"
|
|
99
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
100
|
+
checksum = "9ab5bcf04a2cdcbb50c7d6105de943f543f9ed92af55818fd17b660390fc8636"
|
|
101
|
+
dependencies = [
|
|
102
|
+
"libc",
|
|
103
|
+
"pyo3-build-config",
|
|
104
|
+
]
|
|
105
|
+
|
|
106
|
+
[[package]]
|
|
107
|
+
name = "pyo3-macros"
|
|
108
|
+
version = "0.22.6"
|
|
109
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
110
|
+
checksum = "0fd24d897903a9e6d80b968368a34e1525aeb719d568dba8b3d4bfa5dc67d453"
|
|
111
|
+
dependencies = [
|
|
112
|
+
"proc-macro2",
|
|
113
|
+
"pyo3-macros-backend",
|
|
114
|
+
"quote",
|
|
115
|
+
"syn",
|
|
116
|
+
]
|
|
117
|
+
|
|
118
|
+
[[package]]
|
|
119
|
+
name = "pyo3-macros-backend"
|
|
120
|
+
version = "0.22.6"
|
|
121
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
122
|
+
checksum = "36c011a03ba1e50152b4b394b479826cad97e7a21eb52df179cd91ac411cbfbe"
|
|
123
|
+
dependencies = [
|
|
124
|
+
"heck",
|
|
125
|
+
"proc-macro2",
|
|
126
|
+
"pyo3-build-config",
|
|
127
|
+
"quote",
|
|
128
|
+
"syn",
|
|
129
|
+
]
|
|
130
|
+
|
|
131
|
+
[[package]]
|
|
132
|
+
name = "quote"
|
|
133
|
+
version = "1.0.47"
|
|
134
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
135
|
+
checksum = "1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001"
|
|
136
|
+
dependencies = [
|
|
137
|
+
"proc-macro2",
|
|
138
|
+
]
|
|
139
|
+
|
|
140
|
+
[[package]]
|
|
141
|
+
name = "rustversion"
|
|
142
|
+
version = "1.0.23"
|
|
143
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
144
|
+
checksum = "cf54715a573b99ac80df0bc206da022bcd442c974952c7b9720069370852e21f"
|
|
145
|
+
|
|
146
|
+
[[package]]
|
|
147
|
+
name = "statsx"
|
|
148
|
+
version = "0.1.0"
|
|
149
|
+
dependencies = [
|
|
150
|
+
"pyo3",
|
|
151
|
+
]
|
|
152
|
+
|
|
153
|
+
[[package]]
|
|
154
|
+
name = "syn"
|
|
155
|
+
version = "2.0.119"
|
|
156
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
157
|
+
checksum = "872831b642d1a07999a962a351ed35b955ea2cfc8f3862091e2a240a84f17297"
|
|
158
|
+
dependencies = [
|
|
159
|
+
"proc-macro2",
|
|
160
|
+
"quote",
|
|
161
|
+
"unicode-ident",
|
|
162
|
+
]
|
|
163
|
+
|
|
164
|
+
[[package]]
|
|
165
|
+
name = "target-lexicon"
|
|
166
|
+
version = "0.12.16"
|
|
167
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
168
|
+
checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1"
|
|
169
|
+
|
|
170
|
+
[[package]]
|
|
171
|
+
name = "unicode-ident"
|
|
172
|
+
version = "1.0.27"
|
|
173
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
174
|
+
checksum = "a2c754d6c33795a1c324727428e5a7dedb5b06195f9890bdbcba760d3e246563"
|
|
175
|
+
|
|
176
|
+
[[package]]
|
|
177
|
+
name = "unindent"
|
|
178
|
+
version = "0.2.4"
|
|
179
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
180
|
+
checksum = "7264e107f553ccae879d21fbea1d6724ac785e8c3bfc762137959b5802826ef3"
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Native accelerator for statsx: built by maturin as the `statsx._accel`
|
|
2
|
+
# Python extension module (PyO3) and shipped INSIDE the statsx wheel — there is no
|
|
3
|
+
# separate package. See [tool.maturin] in the repo-root pyproject.toml.
|
|
4
|
+
#
|
|
5
|
+
# Build (dev): maturin develop --release (from the repo ROOT, into the venv)
|
|
6
|
+
# Build wheels: maturin build --release
|
|
7
|
+
[package]
|
|
8
|
+
name = "statsx"
|
|
9
|
+
version = "0.1.0"
|
|
10
|
+
edition = "2021"
|
|
11
|
+
description = "Native accelerator for statsx (built into the package)."
|
|
12
|
+
license = "MIT"
|
|
13
|
+
|
|
14
|
+
[lib]
|
|
15
|
+
# Built by maturin as the `statsx._accel` submodule of the merged package.
|
|
16
|
+
# Default source path is src/lib.rs, relative to this manifest (rust/src/lib.rs).
|
|
17
|
+
name = "_accel"
|
|
18
|
+
crate-type = ["cdylib"]
|
|
19
|
+
|
|
20
|
+
[dependencies]
|
|
21
|
+
# abi3-py311: build against Python's stable ABI so ONE wheel works on 3.11 and every later
|
|
22
|
+
# version (3.12, 3.13, ...) — no per-version rebuild. extension-module lets it link as a
|
|
23
|
+
# Python extension without linking libpython.
|
|
24
|
+
pyo3 = { version = "0.22", features = ["extension-module", "abi3-py311"] }
|
|
25
|
+
|
|
26
|
+
[profile.release]
|
|
27
|
+
opt-level = 3
|
|
28
|
+
lto = true
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// Native accelerator for statsx, compiled by maturin into the
|
|
2
|
+
// `statsx._accel` extension module. Stub — fill with real hot paths.
|
|
3
|
+
use pyo3::prelude::*;
|
|
4
|
+
|
|
5
|
+
#[pyfunction]
|
|
6
|
+
fn version() -> &'static str {
|
|
7
|
+
env!("CARGO_PKG_VERSION")
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
#[pymodule]
|
|
11
|
+
fn _accel(m: &Bound<'_, PyModule>) -> PyResult<()> {
|
|
12
|
+
m.add_function(wrap_pyfunction!(version, m)?)?;
|
|
13
|
+
Ok(())
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Top-level package."""
|
|
File without changes
|