curvepress 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.
- curvepress-0.1.0/.github/dependabot.yml +15 -0
- curvepress-0.1.0/.github/workflows/ci.yml +68 -0
- curvepress-0.1.0/.github/workflows/release-crates.yml +28 -0
- curvepress-0.1.0/.github/workflows/release-npm.yml +45 -0
- curvepress-0.1.0/.github/workflows/release-pypi.yml +133 -0
- curvepress-0.1.0/.github/workflows/rust-clippy.yml +44 -0
- curvepress-0.1.0/.gitignore +22 -0
- curvepress-0.1.0/Cargo.lock +1037 -0
- curvepress-0.1.0/Cargo.toml +48 -0
- curvepress-0.1.0/LICENSE +21 -0
- curvepress-0.1.0/PKG-INFO +423 -0
- curvepress-0.1.0/README.md +407 -0
- curvepress-0.1.0/benches/bench.rs +45 -0
- curvepress-0.1.0/build.rs +29 -0
- curvepress-0.1.0/cbindgen.toml +22 -0
- curvepress-0.1.0/conanfile.py +60 -0
- curvepress-0.1.0/cpp/CMakeLists.txt +63 -0
- curvepress-0.1.0/cpp/include/curvepress/curvepress.hpp +200 -0
- curvepress-0.1.0/include/curvepress.h +137 -0
- curvepress-0.1.0/package.json +19 -0
- curvepress-0.1.0/pyproject.toml +24 -0
- curvepress-0.1.0/python/curvepress/__init__.py +25 -0
- curvepress-0.1.0/python/curvepress/py.typed +0 -0
- curvepress-0.1.0/src/capi.rs +269 -0
- curvepress-0.1.0/src/codec.rs +425 -0
- curvepress-0.1.0/src/error.rs +15 -0
- curvepress-0.1.0/src/lib.rs +120 -0
- curvepress-0.1.0/src/python.rs +175 -0
- curvepress-0.1.0/src/quantize.rs +93 -0
- curvepress-0.1.0/src/radial.rs +47 -0
- curvepress-0.1.0/src/rdp.rs +190 -0
- curvepress-0.1.0/src/varint.rs +76 -0
- curvepress-0.1.0/src/vw.rs +176 -0
- curvepress-0.1.0/src/wasm.rs +109 -0
- curvepress-0.1.0/test_package/CMakeLists.txt +10 -0
- curvepress-0.1.0/test_package/conanfile.py +25 -0
- curvepress-0.1.0/test_package/example.cpp +17 -0
- curvepress-0.1.0/tests/cpp/test_cpp.cpp +116 -0
- curvepress-0.1.0/tests/integration.rs +267 -0
- curvepress-0.1.0/tests/python/test_python.py +158 -0
- curvepress-0.1.0/tests/wasm/test_wasm.mjs +130 -0
- curvepress-0.1.0/wasm/curvepress.d.ts +83 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
version: 2
|
|
2
|
+
updates:
|
|
3
|
+
# Rust crate dependencies (Cargo.toml / Cargo.lock)
|
|
4
|
+
- package-ecosystem: cargo
|
|
5
|
+
directory: "/"
|
|
6
|
+
schedule:
|
|
7
|
+
interval: weekly
|
|
8
|
+
open-pull-requests-limit: 5
|
|
9
|
+
|
|
10
|
+
# Actions used in the GitHub Actions workflows (.github/workflows)
|
|
11
|
+
- package-ecosystem: github-actions
|
|
12
|
+
directory: "/"
|
|
13
|
+
schedule:
|
|
14
|
+
interval: weekly
|
|
15
|
+
open-pull-requests-limit: 5
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
on:
|
|
3
|
+
push:
|
|
4
|
+
branches: [main]
|
|
5
|
+
pull_request:
|
|
6
|
+
|
|
7
|
+
permissions:
|
|
8
|
+
contents: read
|
|
9
|
+
|
|
10
|
+
concurrency:
|
|
11
|
+
group: ci-${{ github.ref }}
|
|
12
|
+
cancel-in-progress: true
|
|
13
|
+
|
|
14
|
+
jobs:
|
|
15
|
+
test:
|
|
16
|
+
name: Test (${{ matrix.os }})
|
|
17
|
+
runs-on: ${{ matrix.os }}
|
|
18
|
+
strategy:
|
|
19
|
+
fail-fast: false
|
|
20
|
+
matrix:
|
|
21
|
+
os: [ubuntu-latest, windows-latest, macos-14]
|
|
22
|
+
steps:
|
|
23
|
+
- uses: actions/checkout@v5
|
|
24
|
+
- uses: dtolnay/rust-toolchain@stable
|
|
25
|
+
- uses: Swatinem/rust-cache@v2
|
|
26
|
+
- name: cargo test
|
|
27
|
+
run: cargo test
|
|
28
|
+
|
|
29
|
+
# ─── WASM binding (wasm-pack + node) ──────────────────────────────────────────
|
|
30
|
+
wasm:
|
|
31
|
+
name: WASM
|
|
32
|
+
runs-on: ubuntu-latest
|
|
33
|
+
steps:
|
|
34
|
+
- uses: actions/checkout@v5
|
|
35
|
+
- uses: dtolnay/rust-toolchain@stable
|
|
36
|
+
with:
|
|
37
|
+
targets: wasm32-unknown-unknown
|
|
38
|
+
- uses: Swatinem/rust-cache@v2
|
|
39
|
+
- name: Install wasm-pack
|
|
40
|
+
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
|
|
41
|
+
- name: Build WASM (nodejs target)
|
|
42
|
+
run: wasm-pack build --target nodejs --out-dir pkg --features wasm
|
|
43
|
+
- name: Run WASM tests
|
|
44
|
+
run: node tests/wasm/test_wasm.mjs
|
|
45
|
+
|
|
46
|
+
# ─── C++ binding (Conan recipe + test_package) ────────────────────────────────
|
|
47
|
+
conan:
|
|
48
|
+
name: Conan (${{ matrix.os }})
|
|
49
|
+
runs-on: ${{ matrix.os }}
|
|
50
|
+
strategy:
|
|
51
|
+
fail-fast: false
|
|
52
|
+
matrix:
|
|
53
|
+
os: [ubuntu-latest, windows-latest, macos-14]
|
|
54
|
+
steps:
|
|
55
|
+
- uses: actions/checkout@v5
|
|
56
|
+
- uses: dtolnay/rust-toolchain@stable
|
|
57
|
+
- uses: Swatinem/rust-cache@v2
|
|
58
|
+
- uses: actions/setup-python@v6
|
|
59
|
+
with:
|
|
60
|
+
python-version: "3.12"
|
|
61
|
+
- name: Install Conan
|
|
62
|
+
run: pip install "conan>=2.0"
|
|
63
|
+
- name: Conan profile detect
|
|
64
|
+
run: conan profile detect --force
|
|
65
|
+
# `conan create` builds the recipe AND runs test_package (compile + link +
|
|
66
|
+
# run), validating the C ABI header and the per-OS system_libs.
|
|
67
|
+
- name: conan create
|
|
68
|
+
run: conan create .
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
name: Release (crates.io)
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [published]
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
crates:
|
|
13
|
+
name: crates.io (${{ github.event_name == 'release' && 'publish' || 'dry-run' }})
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v5
|
|
17
|
+
- uses: dtolnay/rust-toolchain@stable
|
|
18
|
+
- uses: Swatinem/rust-cache@v2
|
|
19
|
+
|
|
20
|
+
- name: cargo publish (dry run)
|
|
21
|
+
if: github.event_name == 'workflow_dispatch'
|
|
22
|
+
run: cargo publish --dry-run
|
|
23
|
+
|
|
24
|
+
- name: cargo publish
|
|
25
|
+
if: github.event_name == 'release'
|
|
26
|
+
run: cargo publish
|
|
27
|
+
env:
|
|
28
|
+
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
name: Release (npm)
|
|
2
|
+
|
|
3
|
+
# Build the WASM package with wasm-pack and publish it to npm.
|
|
4
|
+
#
|
|
5
|
+
# workflow_dispatch → npm publish --dry-run (no upload, no token needed)
|
|
6
|
+
# release published → npm publish (real upload)
|
|
7
|
+
|
|
8
|
+
on:
|
|
9
|
+
release:
|
|
10
|
+
types: [published]
|
|
11
|
+
workflow_dispatch:
|
|
12
|
+
|
|
13
|
+
permissions:
|
|
14
|
+
contents: read
|
|
15
|
+
|
|
16
|
+
jobs:
|
|
17
|
+
npm:
|
|
18
|
+
name: npm (${{ github.event_name == 'release' && 'publish' || 'dry-run' }})
|
|
19
|
+
runs-on: ubuntu-latest
|
|
20
|
+
steps:
|
|
21
|
+
- uses: actions/checkout@v5
|
|
22
|
+
- uses: dtolnay/rust-toolchain@stable
|
|
23
|
+
with:
|
|
24
|
+
targets: wasm32-unknown-unknown
|
|
25
|
+
- uses: Swatinem/rust-cache@v2
|
|
26
|
+
- uses: actions/setup-node@v5
|
|
27
|
+
with:
|
|
28
|
+
node-version: "20"
|
|
29
|
+
registry-url: "https://registry.npmjs.org"
|
|
30
|
+
- name: Install wasm-pack
|
|
31
|
+
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
|
|
32
|
+
|
|
33
|
+
# bundler target = the standard npm-consumable build (webpack/vite/rollup).
|
|
34
|
+
- name: Build WASM (bundler)
|
|
35
|
+
run: wasm-pack build --target bundler --out-dir pkg --features wasm
|
|
36
|
+
|
|
37
|
+
- name: npm publish (dry run)
|
|
38
|
+
if: github.event_name == 'workflow_dispatch'
|
|
39
|
+
run: npm publish pkg/ --dry-run --access public
|
|
40
|
+
|
|
41
|
+
- name: npm publish
|
|
42
|
+
if: github.event_name == 'release'
|
|
43
|
+
run: npm publish pkg/ --access public
|
|
44
|
+
env:
|
|
45
|
+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
name: Release (PyPI)
|
|
2
|
+
on:
|
|
3
|
+
release:
|
|
4
|
+
types: [published]
|
|
5
|
+
workflow_dispatch:
|
|
6
|
+
|
|
7
|
+
permissions:
|
|
8
|
+
contents: read
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
# ─── Linux (manylinux, glibc) ────────────────────────────────────────────────
|
|
12
|
+
linux:
|
|
13
|
+
name: Linux (${{ matrix.target }})
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
strategy:
|
|
16
|
+
fail-fast: false
|
|
17
|
+
matrix:
|
|
18
|
+
target: [x86_64, aarch64]
|
|
19
|
+
steps:
|
|
20
|
+
- uses: actions/checkout@v5
|
|
21
|
+
- uses: PyO3/maturin-action@v1
|
|
22
|
+
with:
|
|
23
|
+
target: ${{ matrix.target }}
|
|
24
|
+
manylinux: auto
|
|
25
|
+
args: --release --out dist -i python3.9 python3.10 python3.11 python3.12 python3.13 python3.14
|
|
26
|
+
- uses: actions/upload-artifact@v7
|
|
27
|
+
with:
|
|
28
|
+
name: wheels-linux-${{ matrix.target }}
|
|
29
|
+
path: dist
|
|
30
|
+
|
|
31
|
+
# ─── Linux (musllinux, Alpine) ───────────────────────────────────────────────
|
|
32
|
+
musllinux:
|
|
33
|
+
name: musllinux (${{ matrix.target }})
|
|
34
|
+
runs-on: ubuntu-latest
|
|
35
|
+
strategy:
|
|
36
|
+
fail-fast: false
|
|
37
|
+
matrix:
|
|
38
|
+
target: [x86_64, aarch64]
|
|
39
|
+
steps:
|
|
40
|
+
- uses: actions/checkout@v5
|
|
41
|
+
- uses: PyO3/maturin-action@v1
|
|
42
|
+
with:
|
|
43
|
+
target: ${{ matrix.target }}
|
|
44
|
+
manylinux: musllinux_1_2
|
|
45
|
+
args: --release --out dist -i python3.9 python3.10 python3.11 python3.12 python3.13 python3.14
|
|
46
|
+
- uses: actions/upload-artifact@v7
|
|
47
|
+
with:
|
|
48
|
+
name: wheels-musllinux-${{ matrix.target }}
|
|
49
|
+
path: dist
|
|
50
|
+
|
|
51
|
+
# ─── Windows (x64) ───────────────────────────────────────────────────────────
|
|
52
|
+
windows:
|
|
53
|
+
name: Windows (py${{ matrix.python-version }})
|
|
54
|
+
runs-on: windows-latest
|
|
55
|
+
strategy:
|
|
56
|
+
fail-fast: false
|
|
57
|
+
matrix:
|
|
58
|
+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
|
|
59
|
+
steps:
|
|
60
|
+
- uses: actions/checkout@v5
|
|
61
|
+
- uses: actions/setup-python@v6
|
|
62
|
+
with:
|
|
63
|
+
python-version: ${{ matrix.python-version }}
|
|
64
|
+
architecture: x64
|
|
65
|
+
- uses: PyO3/maturin-action@v1
|
|
66
|
+
with:
|
|
67
|
+
args: --release --out dist -i python
|
|
68
|
+
- uses: actions/upload-artifact@v7
|
|
69
|
+
with:
|
|
70
|
+
name: wheels-windows-${{ matrix.python-version }}
|
|
71
|
+
path: dist
|
|
72
|
+
|
|
73
|
+
# ─── macOS (Apple Silicon, arm64) ───────────────────────────────────────────
|
|
74
|
+
macos:
|
|
75
|
+
name: macOS (arm64, py${{ matrix.python-version }})
|
|
76
|
+
runs-on: macos-14
|
|
77
|
+
strategy:
|
|
78
|
+
fail-fast: false
|
|
79
|
+
matrix:
|
|
80
|
+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
|
|
81
|
+
steps:
|
|
82
|
+
- uses: actions/checkout@v5
|
|
83
|
+
- uses: actions/setup-python@v6
|
|
84
|
+
with:
|
|
85
|
+
python-version: ${{ matrix.python-version }}
|
|
86
|
+
- uses: PyO3/maturin-action@v1
|
|
87
|
+
with:
|
|
88
|
+
args: --release --out dist -i python
|
|
89
|
+
- uses: actions/upload-artifact@v7
|
|
90
|
+
with:
|
|
91
|
+
name: wheels-macos-arm64-${{ matrix.python-version }}
|
|
92
|
+
path: dist
|
|
93
|
+
|
|
94
|
+
# ─── Source distribution ─────────────────────────────────────────────────────
|
|
95
|
+
sdist:
|
|
96
|
+
name: sdist
|
|
97
|
+
runs-on: ubuntu-latest
|
|
98
|
+
steps:
|
|
99
|
+
- uses: actions/checkout@v5
|
|
100
|
+
- uses: PyO3/maturin-action@v1
|
|
101
|
+
with:
|
|
102
|
+
command: sdist
|
|
103
|
+
args: --out dist
|
|
104
|
+
- uses: actions/upload-artifact@v7
|
|
105
|
+
with:
|
|
106
|
+
name: wheels-sdist
|
|
107
|
+
path: dist
|
|
108
|
+
|
|
109
|
+
# ─── Publish ─────────────────────────────────────────────────────────────────
|
|
110
|
+
publish:
|
|
111
|
+
name: Publish (${{ github.event_name == 'release' && 'PyPI' || 'TestPyPI' }})
|
|
112
|
+
runs-on: ubuntu-latest
|
|
113
|
+
needs: [linux, musllinux, windows, macos, sdist]
|
|
114
|
+
steps:
|
|
115
|
+
- uses: actions/download-artifact@v7
|
|
116
|
+
with:
|
|
117
|
+
pattern: wheels-*
|
|
118
|
+
path: dist
|
|
119
|
+
merge-multiple: true
|
|
120
|
+
|
|
121
|
+
- name: Publish to TestPyPI
|
|
122
|
+
if: github.event_name == 'workflow_dispatch'
|
|
123
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
124
|
+
with:
|
|
125
|
+
repository-url: https://test.pypi.org/legacy/
|
|
126
|
+
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
|
|
127
|
+
skip-existing: true
|
|
128
|
+
|
|
129
|
+
- name: Publish to PyPI
|
|
130
|
+
if: github.event_name == 'release'
|
|
131
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
132
|
+
with:
|
|
133
|
+
password: ${{ secrets.PYPI_API_TOKEN }}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
name: Rust-Clippy
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: ["main"]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: ["main"]
|
|
8
|
+
schedule:
|
|
9
|
+
- cron: "20 15 * * 5"
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
rust-clippy-analyze:
|
|
13
|
+
name: Run rust-clippy analyzing
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
permissions:
|
|
16
|
+
contents: read
|
|
17
|
+
security-events: write
|
|
18
|
+
actions: read
|
|
19
|
+
steps:
|
|
20
|
+
- name: Checkout code
|
|
21
|
+
uses: actions/checkout@v5
|
|
22
|
+
|
|
23
|
+
- name: Install Rust toolchain
|
|
24
|
+
uses: dtolnay/rust-toolchain@stable
|
|
25
|
+
with:
|
|
26
|
+
components: clippy
|
|
27
|
+
|
|
28
|
+
- uses: Swatinem/rust-cache@v2
|
|
29
|
+
|
|
30
|
+
- name: Install SARIF tooling
|
|
31
|
+
run: cargo install clippy-sarif sarif-fmt
|
|
32
|
+
|
|
33
|
+
- name: Run rust-clippy
|
|
34
|
+
run:
|
|
35
|
+
cargo clippy
|
|
36
|
+
--all-targets
|
|
37
|
+
--message-format=json | clippy-sarif | tee rust-clippy-results.sarif | sarif-fmt
|
|
38
|
+
continue-on-error: true
|
|
39
|
+
|
|
40
|
+
- name: Upload analysis results to GitHub
|
|
41
|
+
uses: github/codeql-action/upload-sarif@v3
|
|
42
|
+
with:
|
|
43
|
+
sarif_file: rust-clippy-results.sarif
|
|
44
|
+
wait-for-processing: true
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/target/
|
|
2
|
+
/pkg/
|
|
3
|
+
/pkg-node/
|
|
4
|
+
|
|
5
|
+
# Python build artifacts
|
|
6
|
+
*.egg-info/
|
|
7
|
+
dist/
|
|
8
|
+
__pycache__/
|
|
9
|
+
*.pyo
|
|
10
|
+
*.pyc
|
|
11
|
+
*.pyd
|
|
12
|
+
.venv/
|
|
13
|
+
|
|
14
|
+
# C++ build
|
|
15
|
+
cpp/build/
|
|
16
|
+
|
|
17
|
+
# Conan (test_package build artifacts)
|
|
18
|
+
test_package/build/
|
|
19
|
+
test_package/CMakeUserPresets.json
|
|
20
|
+
|
|
21
|
+
# wasm-pack
|
|
22
|
+
.wasm-pack/
|