ries-rs 1.0.1__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.
Files changed (104) hide show
  1. ries_rs-1.0.1/.github/release-template.md +18 -0
  2. ries_rs-1.0.1/.github/workflows/benchmark.yml +46 -0
  3. ries_rs-1.0.1/.github/workflows/ci.yml +209 -0
  4. ries_rs-1.0.1/.github/workflows/coverage.yml +37 -0
  5. ries_rs-1.0.1/.github/workflows/release.yml +259 -0
  6. ries_rs-1.0.1/.gitignore +63 -0
  7. ries_rs-1.0.1/.zenodo.json +78 -0
  8. ries_rs-1.0.1/CHANGELOG.md +50 -0
  9. ries_rs-1.0.1/CITATION.cff +39 -0
  10. ries_rs-1.0.1/CONTRIBUTING.md +118 -0
  11. ries_rs-1.0.1/Cargo.lock +1533 -0
  12. ries_rs-1.0.1/Cargo.toml +128 -0
  13. ries_rs-1.0.1/LICENSE +21 -0
  14. ries_rs-1.0.1/PKG-INFO +55 -0
  15. ries_rs-1.0.1/PYPI.md +29 -0
  16. ries_rs-1.0.1/README.md +217 -0
  17. ries_rs-1.0.1/RELEASING.md +135 -0
  18. ries_rs-1.0.1/benches/evaluation.rs +174 -0
  19. ries_rs-1.0.1/benches/generation.rs +171 -0
  20. ries_rs-1.0.1/benches/search.rs +211 -0
  21. ries_rs-1.0.1/docs/ARCHITECTURE.md +244 -0
  22. ries_rs-1.0.1/docs/COMPLEXITY.md +143 -0
  23. ries_rs-1.0.1/docs/PARITY_STATUS.md +23 -0
  24. ries_rs-1.0.1/docs/PERFORMANCE.md +268 -0
  25. ries_rs-1.0.1/docs/PYTHON_BINDINGS.md +134 -0
  26. ries_rs-1.0.1/docs/README.md +34 -0
  27. ries_rs-1.0.1/docs/SEARCH_MODEL.md +188 -0
  28. ries_rs-1.0.1/docs/WASM_BINDINGS.md +125 -0
  29. ries_rs-1.0.1/docs/assets/web-ui.png +0 -0
  30. ries_rs-1.0.1/docs/benchmarks/2026-02-25-generation-parallel-scaling.md +46 -0
  31. ries_rs-1.0.1/docs/benchmarks/2026-02-25-level3-baseline.md +53 -0
  32. ries_rs-1.0.1/docs/benchmarks/README.md +18 -0
  33. ries_rs-1.0.1/docs/benchmarks/artifacts/2026-02-25-environment.txt +30 -0
  34. ries_rs-1.0.1/docs/benchmarks/artifacts/2026-02-25-generation-parallel-criterion.txt +116 -0
  35. ries_rs-1.0.1/docs/benchmarks/artifacts/2026-02-25-level3-parallel.json +248 -0
  36. ries_rs-1.0.1/docs/benchmarks/artifacts/2026-02-25-level3-seq-deterministic.json +248 -0
  37. ries_rs-1.0.1/docs/releases/v1.0.0.md +38 -0
  38. ries_rs-1.0.1/docs/releases/v1.0.1.md +29 -0
  39. ries_rs-1.0.1/examples/basic_search.rs +36 -0
  40. ries_rs-1.0.1/examples/custom_config.rs +60 -0
  41. ries_rs-1.0.1/examples/streaming.rs +69 -0
  42. ries_rs-1.0.1/pyproject.toml +37 -0
  43. ries_rs-1.0.1/ries-py/Cargo.lock +726 -0
  44. ries_rs-1.0.1/ries-py/Cargo.toml +25 -0
  45. ries_rs-1.0.1/ries-py/PYPI.md +29 -0
  46. ries_rs-1.0.1/ries-py/src/lib.rs +446 -0
  47. ries_rs-1.0.1/schema/run-manifest-v1.json +184 -0
  48. ries_rs-1.0.1/scripts/build_web_site.sh +18 -0
  49. ries_rs-1.0.1/scripts/profile_comparison.sh +137 -0
  50. ries_rs-1.0.1/src/cli/args.rs +848 -0
  51. ries_rs-1.0.1/src/cli/config_builder.rs +308 -0
  52. ries_rs-1.0.1/src/cli/diagnostics.rs +129 -0
  53. ries_rs-1.0.1/src/cli/json_types.rs +289 -0
  54. ries_rs-1.0.1/src/cli/legacy.rs +220 -0
  55. ries_rs-1.0.1/src/cli/manifest.rs +79 -0
  56. ries_rs-1.0.1/src/cli/mod.rs +60 -0
  57. ries_rs-1.0.1/src/cli/output.rs +403 -0
  58. ries_rs-1.0.1/src/cli/runtime.rs +199 -0
  59. ries_rs-1.0.1/src/cli/search_runner.rs +64 -0
  60. ries_rs-1.0.1/src/eval.rs +1247 -0
  61. ries_rs-1.0.1/src/expr.rs +980 -0
  62. ries_rs-1.0.1/src/fast_match.rs +630 -0
  63. ries_rs-1.0.1/src/gen.rs +2013 -0
  64. ries_rs-1.0.1/src/highprec_verify.rs +486 -0
  65. ries_rs-1.0.1/src/lib.rs +166 -0
  66. ries_rs-1.0.1/src/main.rs +854 -0
  67. ries_rs-1.0.1/src/manifest.rs +288 -0
  68. ries_rs-1.0.1/src/metrics.rs +441 -0
  69. ries_rs-1.0.1/src/pool.rs +561 -0
  70. ries_rs-1.0.1/src/precision.rs +824 -0
  71. ries_rs-1.0.1/src/presets.rs +314 -0
  72. ries_rs-1.0.1/src/profile.rs +557 -0
  73. ries_rs-1.0.1/src/pslq.rs +503 -0
  74. ries_rs-1.0.1/src/report.rs +431 -0
  75. ries_rs-1.0.1/src/search/db.rs +554 -0
  76. ries_rs-1.0.1/src/search/newton.rs +89 -0
  77. ries_rs-1.0.1/src/search/tests.rs +1501 -0
  78. ries_rs-1.0.1/src/search.rs +1257 -0
  79. ries_rs-1.0.1/src/solver.rs +674 -0
  80. ries_rs-1.0.1/src/stability.rs +351 -0
  81. ries_rs-1.0.1/src/symbol.rs +828 -0
  82. ries_rs-1.0.1/src/symbol_table.rs +531 -0
  83. ries_rs-1.0.1/src/thresholds.rs +304 -0
  84. ries_rs-1.0.1/src/udf.rs +303 -0
  85. ries_rs-1.0.1/src/wasm.rs +438 -0
  86. ries_rs-1.0.1/tests/README.md +19 -0
  87. ries_rs-1.0.1/tests/cli/basics.rs +973 -0
  88. ries_rs-1.0.1/tests/cli/diagnostics.rs +268 -0
  89. ries_rs-1.0.1/tests/cli/legacy.rs +196 -0
  90. ries_rs-1.0.1/tests/cli/ranking.rs +144 -0
  91. ries_rs-1.0.1/tests/cli_regression_tests.rs +124 -0
  92. ries_rs-1.0.1/tests/common/mod.rs +7 -0
  93. ries_rs-1.0.1/tests/compare_with_original.sh +36 -0
  94. ries_rs-1.0.1/tests/evaluation_tests.rs +207 -0
  95. ries_rs-1.0.1/tests/expensive_debug_tests.rs +239 -0
  96. ries_rs-1.0.1/tests/expression_tests.rs +142 -0
  97. ries_rs-1.0.1/tests/integration_tests.rs +113 -0
  98. ries_rs-1.0.1/tests/profile_tests.rs +121 -0
  99. ries_rs-1.0.1/tests/property_tests.proptest-regressions +8 -0
  100. ries_rs-1.0.1/tests/property_tests.rs +705 -0
  101. ries_rs-1.0.1/tests/search_tests.rs +568 -0
  102. ries_rs-1.0.1/tests/test_expr_wasm.rs +135 -0
  103. ries_rs-1.0.1/tests/wasm_tests.rs +121 -0
  104. ries_rs-1.0.1/tools/replay_manifest.py +165 -0
@@ -0,0 +1,18 @@
1
+ ## Downloads
2
+
3
+ This release includes:
4
+
5
+ - Native CLI binaries for Linux, macOS, and Windows
6
+ - WebAssembly packages for browser, bundler, and Node.js targets
7
+ - Python wheels built from `ries-py/`
8
+
9
+ ## Notes
10
+
11
+ - For deterministic research workflows, prefer `--deterministic` together with
12
+ `--json` and `--emit-manifest`.
13
+ - Citation metadata lives in `CITATION.cff`.
14
+ - Zenodo will mint a DOI for the release after publication.
15
+
16
+ ## Full Changelog
17
+
18
+ See `CHANGELOG.md` in the repository for the full version history.
@@ -0,0 +1,46 @@
1
+ name: Benchmarks
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ inputs:
6
+ baseline:
7
+ description: "Baseline name to compare against (leave empty to just save as 'main')"
8
+ required: false
9
+ default: ""
10
+
11
+ jobs:
12
+ bench:
13
+ name: Run benchmarks
14
+ runs-on: ubuntu-latest
15
+ steps:
16
+ - name: Checkout
17
+ uses: actions/checkout@v4
18
+
19
+ - name: Setup Rust
20
+ uses: dtolnay/rust-toolchain@stable
21
+
22
+ - name: Cache cargo registry
23
+ uses: Swatinem/rust-cache@v2
24
+
25
+ - name: Run benchmarks (compare against baseline)
26
+ if: inputs.baseline != ''
27
+ env:
28
+ BASELINE: ${{ inputs.baseline }}
29
+ run: |
30
+ cargo bench --bench evaluation -- --baseline "$BASELINE"
31
+ cargo bench --bench search -- --baseline "$BASELINE"
32
+ cargo bench --bench generation -- --baseline "$BASELINE"
33
+
34
+ - name: Run benchmarks (save as 'main' baseline)
35
+ if: inputs.baseline == ''
36
+ run: |
37
+ cargo bench --bench evaluation -- --save-baseline main
38
+ cargo bench --bench search -- --save-baseline main
39
+ cargo bench --bench generation -- --save-baseline main
40
+
41
+ - name: Upload criterion report
42
+ uses: actions/upload-artifact@v4
43
+ with:
44
+ name: criterion-report-${{ github.sha }}
45
+ path: target/criterion/
46
+ retention-days: 90
@@ -0,0 +1,209 @@
1
+ name: CI
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ push:
6
+ branches: [main, master]
7
+ pull_request:
8
+ branches: [main, master]
9
+
10
+ jobs:
11
+ fmt:
12
+ name: Format
13
+ runs-on: ubuntu-latest
14
+ steps:
15
+ - name: Checkout
16
+ uses: actions/checkout@v4
17
+
18
+ - name: Setup Rust
19
+ uses: dtolnay/rust-toolchain@stable
20
+ with:
21
+ components: rustfmt
22
+
23
+ - name: Check formatting
24
+ run: cargo fmt -- --check
25
+
26
+ clippy:
27
+ name: Clippy
28
+ runs-on: ubuntu-latest
29
+ steps:
30
+ - name: Checkout
31
+ uses: actions/checkout@v4
32
+
33
+ - name: Setup Rust
34
+ uses: dtolnay/rust-toolchain@stable
35
+ with:
36
+ components: clippy
37
+
38
+ - name: Cache cargo registry
39
+ uses: Swatinem/rust-cache@v2
40
+
41
+ - name: Install dependencies for rug (GMP/MPFR)
42
+ run: sudo apt-get update && sudo apt-get install -y libgmp-dev libmpfr-dev
43
+
44
+ - name: Run clippy (default features)
45
+ run: cargo clippy --all-targets --locked -- -D warnings
46
+
47
+ - name: Run clippy (no default features)
48
+ run: cargo clippy --all-targets --no-default-features --locked -- -D warnings
49
+
50
+ - name: Run clippy (highprec feature)
51
+ run: cargo clippy --all-targets --features highprec --locked -- -D warnings
52
+
53
+ check-features:
54
+ name: Feature coverage check
55
+ runs-on: ubuntu-latest
56
+ steps:
57
+ - name: Checkout
58
+ uses: actions/checkout@v4
59
+
60
+ - name: Setup Rust
61
+ uses: dtolnay/rust-toolchain@stable
62
+
63
+ - name: Cache cargo registry
64
+ uses: Swatinem/rust-cache@v2
65
+
66
+ - name: Setup Python
67
+ uses: actions/setup-python@v5
68
+ with:
69
+ python-version: '3.11'
70
+
71
+ - name: Check Python bindings crate
72
+ run: cargo check --manifest-path ries-py/Cargo.toml --locked
73
+
74
+ - name: Build wasm feature
75
+ run: cargo build --features wasm --locked
76
+
77
+ - name: Build wasm + parallel features
78
+ run: cargo build --features "wasm parallel" --locked
79
+
80
+ test:
81
+ name: Test (${{ matrix.os }})
82
+ runs-on: ${{ matrix.os }}
83
+ env:
84
+ CARGO_PROFILE_TEST_DEBUG: 0
85
+ strategy:
86
+ fail-fast: false
87
+ matrix:
88
+ os: [ubuntu-latest, macos-latest, windows-latest]
89
+ steps:
90
+ - name: Checkout
91
+ uses: actions/checkout@v4
92
+
93
+ - name: Setup Rust
94
+ uses: dtolnay/rust-toolchain@stable
95
+
96
+ - name: Install cargo-nextest
97
+ uses: taiki-e/install-action@nextest
98
+
99
+ - name: Cache cargo registry
100
+ uses: Swatinem/rust-cache@v2
101
+
102
+ - name: Run tests
103
+ run: cargo nextest run --tests --locked
104
+
105
+ test-highprec:
106
+ name: Test (highprec feature)
107
+ runs-on: ubuntu-latest
108
+ env:
109
+ CARGO_PROFILE_TEST_DEBUG: 0
110
+ steps:
111
+ - name: Checkout
112
+ uses: actions/checkout@v4
113
+
114
+ - name: Setup Rust
115
+ uses: dtolnay/rust-toolchain@stable
116
+
117
+ - name: Install cargo-nextest
118
+ uses: taiki-e/install-action@nextest
119
+
120
+ - name: Cache cargo registry
121
+ uses: Swatinem/rust-cache@v2
122
+
123
+ - name: Install dependencies for rug (GMP/MPFR)
124
+ run: sudo apt-get update && sudo apt-get install -y libgmp-dev libmpfr-dev
125
+
126
+ - name: Run tests with highprec feature
127
+ run: cargo nextest run --tests --features highprec --locked
128
+
129
+ test-wasm:
130
+ name: Test (WASM)
131
+ runs-on: ubuntu-latest
132
+ steps:
133
+ - name: Checkout
134
+ uses: actions/checkout@v4
135
+
136
+ - name: Setup Rust
137
+ uses: dtolnay/rust-toolchain@stable
138
+ with:
139
+ targets: wasm32-unknown-unknown
140
+
141
+ - name: Install wasm-pack
142
+ uses: jetli/wasm-pack-action@v0.4.0
143
+
144
+ - name: Run WASM tests
145
+ run: wasm-pack test --node -- --features wasm
146
+
147
+ audit:
148
+ name: Security Audit
149
+ runs-on: ubuntu-latest
150
+ steps:
151
+ - name: Checkout
152
+ uses: actions/checkout@v4
153
+
154
+ - name: Setup Rust
155
+ uses: dtolnay/rust-toolchain@stable
156
+
157
+ - name: Install cargo-audit
158
+ uses: taiki-e/install-action@cargo-audit
159
+
160
+ - name: Run security audit
161
+ run: cargo audit
162
+
163
+ parity-check:
164
+ name: Parity Check (Original RIES)
165
+ runs-on: ubuntu-latest
166
+ steps:
167
+ - name: Checkout ries-rs
168
+ uses: actions/checkout@v4
169
+
170
+ - name: Detect bundled original RIES source
171
+ id: has-original
172
+ run: |
173
+ if [ -f ries-original/ries.c ]; then
174
+ echo "present=true" >> "$GITHUB_OUTPUT"
175
+ else
176
+ echo "present=false" >> "$GITHUB_OUTPUT"
177
+ echo "ries-original/ries.c not found; skipping parity-check job steps."
178
+ fi
179
+
180
+ - name: Setup C Compiler
181
+ if: steps.has-original.outputs.present == 'true'
182
+ run: sudo apt-get update && sudo apt-get install -y gcc
183
+
184
+ - name: Compile Original RIES
185
+ if: steps.has-original.outputs.present == 'true'
186
+ run: gcc ries-original/ries.c -lm -o ries-original/ries
187
+
188
+ - name: Setup Rust
189
+ if: steps.has-original.outputs.present == 'true'
190
+ uses: dtolnay/rust-toolchain@stable
191
+
192
+ - name: Cache cargo registry
193
+ if: steps.has-original.outputs.present == 'true'
194
+ uses: Swatinem/rust-cache@v2
195
+
196
+ - name: Build ries-rs
197
+ if: steps.has-original.outputs.present == 'true'
198
+ run: cargo build --release
199
+
200
+ - name: Run Parity Checks
201
+ if: steps.has-original.outputs.present == 'true'
202
+ run: |
203
+ chmod +x tests/compare_with_original.sh
204
+ # Test Pi
205
+ ./tests/compare_with_original.sh 3.1415926535 2 6 ./ries-original/ries
206
+ # Test e
207
+ ./tests/compare_with_original.sh 2.7182818284 2 6 ./ries-original/ries
208
+ # Test Golden Ratio
209
+ ./tests/compare_with_original.sh 1.6180339887 2 6 ./ries-original/ries
@@ -0,0 +1,37 @@
1
+ name: Coverage
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ push:
6
+ branches: [main, master]
7
+ pull_request:
8
+ branches: [main, master]
9
+
10
+ jobs:
11
+ coverage:
12
+ runs-on: ubuntu-latest
13
+ steps:
14
+ - uses: actions/checkout@v4
15
+
16
+ - name: Install Rust
17
+ uses: dtolnay/rust-toolchain@stable
18
+
19
+ - name: Install tarpaulin
20
+ uses: taiki-e/install-action@cargo-tarpaulin
21
+
22
+ - name: Generate coverage
23
+ run: >-
24
+ cargo tarpaulin --locked --out Xml --output-dir ./coverage
25
+ --timeout 1200 --follow-exec --fail-under 50
26
+
27
+ - name: Report coverage summary
28
+ run: |
29
+ echo "## Coverage Report" >> $GITHUB_STEP_SUMMARY
30
+ echo "Coverage report generated and uploaded as artifact." >> $GITHUB_STEP_SUMMARY
31
+
32
+ - name: Upload coverage report
33
+ uses: actions/upload-artifact@v4
34
+ with:
35
+ name: coverage-report
36
+ path: ./coverage/cobertura.xml
37
+ retention-days: 30
@@ -0,0 +1,259 @@
1
+ name: Release
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - 'v*'
7
+
8
+ permissions:
9
+ contents: write
10
+ id-token: write
11
+
12
+ jobs:
13
+ build-binaries:
14
+ name: Build ${{ matrix.target }}
15
+ runs-on: ${{ matrix.os }}
16
+ strategy:
17
+ fail-fast: false
18
+ matrix:
19
+ include:
20
+ - target: x86_64-unknown-linux-gnu
21
+ os: ubuntu-latest
22
+ artifact: ries-rs-linux-x86_64
23
+ - target: x86_64-apple-darwin
24
+ os: macos-latest
25
+ artifact: ries-rs-macos-x86_64
26
+ - target: aarch64-apple-darwin
27
+ os: macos-latest
28
+ artifact: ries-rs-macos-aarch64
29
+ - target: x86_64-pc-windows-msvc
30
+ os: windows-latest
31
+ artifact: ries-rs-windows-x86_64.exe
32
+
33
+ steps:
34
+ - name: Checkout
35
+ uses: actions/checkout@v4
36
+
37
+ - name: Setup Rust
38
+ uses: dtolnay/rust-toolchain@stable
39
+ with:
40
+ targets: ${{ matrix.target }}
41
+
42
+ - name: Build
43
+ run: cargo build --release --locked --target ${{ matrix.target }}
44
+
45
+ - name: Package (Unix)
46
+ if: runner.os != 'Windows'
47
+ run: |
48
+ cd target/${{ matrix.target }}/release
49
+ strip ries-rs || true
50
+ tar -czvf ${{ matrix.artifact }}.tar.gz ries-rs
51
+
52
+ - name: Package (Windows)
53
+ if: runner.os == 'Windows'
54
+ run: |
55
+ cd target/${{ matrix.target }}/release
56
+ 7z a ${{ matrix.artifact }}.zip ries-rs.exe
57
+
58
+ - name: Upload artifact
59
+ uses: actions/upload-artifact@v4
60
+ with:
61
+ name: ${{ matrix.artifact }}
62
+ path: target/${{ matrix.target }}/release/${{ matrix.artifact }}.*
63
+
64
+ build-wasm:
65
+ name: Build WASM
66
+ runs-on: ubuntu-latest
67
+ steps:
68
+ - name: Checkout
69
+ uses: actions/checkout@v4
70
+
71
+ - name: Setup Rust (nightly + wasm32)
72
+ uses: dtolnay/rust-toolchain@nightly
73
+ with:
74
+ targets: wasm32-unknown-unknown
75
+ components: rust-src
76
+
77
+ - name: Setup Node.js
78
+ uses: actions/setup-node@v4
79
+ with:
80
+ node-version: '20'
81
+
82
+ - name: Install wasm-pack
83
+ run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
84
+
85
+ - name: Install Node dependencies
86
+ run: npm install --no-fund --no-audit
87
+
88
+ - name: Build WASM
89
+ run: npm run build:all
90
+ env:
91
+ CI: true
92
+
93
+ - name: Package WASM
94
+ run: tar -czvf ries-rs-wasm.tar.gz pkg pkg-node pkg-bundler
95
+
96
+ - name: Upload artifact
97
+ uses: actions/upload-artifact@v4
98
+ with:
99
+ name: ries-rs-wasm
100
+ path: ries-rs-wasm.tar.gz
101
+
102
+ build-python:
103
+ name: Build Python Wheels
104
+ runs-on: ${{ matrix.os }}
105
+ strategy:
106
+ matrix:
107
+ include:
108
+ - os: ubuntu-latest
109
+ target: x86_64
110
+ - os: macos-latest
111
+ target: aarch64
112
+ - os: windows-latest
113
+ target: x86_64
114
+
115
+ steps:
116
+ - name: Checkout
117
+ uses: actions/checkout@v4
118
+
119
+ - name: Setup Python
120
+ uses: actions/setup-python@v5
121
+ with:
122
+ python-version: '3.11'
123
+
124
+ - name: Build wheel
125
+ uses: PyO3/maturin-action@v1
126
+ with:
127
+ command: build
128
+ args: --release --locked --out dist
129
+ target: ${{ matrix.target }}
130
+ working-directory: ries-py
131
+
132
+ - name: Upload artifact
133
+ uses: actions/upload-artifact@v4
134
+ with:
135
+ name: python-wheel-${{ matrix.os }}
136
+ path: ries-py/dist/*.whl
137
+
138
+ build-python-sdist:
139
+ name: Build Python sdist
140
+ runs-on: ubuntu-latest
141
+ steps:
142
+ - name: Checkout
143
+ uses: actions/checkout@v4
144
+
145
+ - name: Setup Python
146
+ uses: actions/setup-python@v5
147
+ with:
148
+ python-version: '3.11'
149
+
150
+ - name: Build sdist
151
+ uses: PyO3/maturin-action@v1
152
+ with:
153
+ command: sdist
154
+ args: --out dist
155
+ working-directory: ries-py
156
+
157
+ - name: Upload artifact
158
+ uses: actions/upload-artifact@v4
159
+ with:
160
+ name: python-sdist
161
+ path: ries-py/dist/*.tar.gz
162
+
163
+ publish-crate:
164
+ name: Publish crate to crates.io
165
+ needs: [build-binaries, build-wasm, build-python, build-python-sdist]
166
+ runs-on: ubuntu-latest
167
+ steps:
168
+ - name: Checkout
169
+ uses: actions/checkout@v4
170
+
171
+ - name: Setup Rust
172
+ uses: dtolnay/rust-toolchain@stable
173
+
174
+ - name: Read crate version
175
+ id: crate_meta
176
+ shell: bash
177
+ run: |
178
+ VERSION=$(cargo metadata --no-deps --format-version 1 | python3 -c 'import json, sys; data=json.load(sys.stdin); print(next(pkg["version"] for pkg in data["packages"] if pkg["name"] == "ries"))')
179
+ echo "version=${VERSION}" >> "$GITHUB_OUTPUT"
180
+
181
+ - name: Check crates.io for existing version
182
+ id: crate_exists
183
+ shell: bash
184
+ run: |
185
+ if curl --fail --silent --show-error "https://crates.io/api/v1/crates/ries/${{ steps.crate_meta.outputs.version }}" > /dev/null; then
186
+ echo "exists=true" >> "$GITHUB_OUTPUT"
187
+ else
188
+ echo "exists=false" >> "$GITHUB_OUTPUT"
189
+ fi
190
+
191
+ - name: Publish crate
192
+ if: steps.crate_exists.outputs.exists != 'true'
193
+ run: cargo publish --locked
194
+ env:
195
+ CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
196
+
197
+ - name: Note skipped crate publish
198
+ if: steps.crate_exists.outputs.exists == 'true'
199
+ run: echo "ries ${{ steps.crate_meta.outputs.version }} is already published on crates.io; skipping upload."
200
+
201
+ publish-python:
202
+ name: Publish Python distributions to PyPI
203
+ needs: [build-python, build-python-sdist]
204
+ runs-on: ubuntu-latest
205
+ environment:
206
+ name: pypi
207
+ url: https://pypi.org/project/ries-rs/
208
+ steps:
209
+ - name: Download wheel artifacts
210
+ uses: actions/download-artifact@v4
211
+ with:
212
+ pattern: python-wheel-*
213
+ path: python-dist
214
+ merge-multiple: true
215
+
216
+ - name: Download sdist artifact
217
+ uses: actions/download-artifact@v4
218
+ with:
219
+ name: python-sdist
220
+ path: python-dist
221
+
222
+ - name: Publish to PyPI
223
+ uses: pypa/gh-action-pypi-publish@release/v1
224
+ with:
225
+ packages-dir: python-dist
226
+ skip-existing: true
227
+
228
+ create-release:
229
+ name: Create Release
230
+ needs: [build-binaries, build-wasm, build-python, build-python-sdist, publish-crate, publish-python]
231
+ runs-on: ubuntu-latest
232
+ steps:
233
+ - name: Checkout
234
+ uses: actions/checkout@v4
235
+
236
+ - name: Download all artifacts
237
+ uses: actions/download-artifact@v4
238
+ with:
239
+ path: artifacts
240
+
241
+ - name: Display structure of downloaded files
242
+ run: ls -la artifacts/
243
+
244
+ - name: Select release notes
245
+ id: release_notes
246
+ shell: bash
247
+ run: |
248
+ BODY_PATH=".github/release-template.md"
249
+ if [ -f "docs/releases/${GITHUB_REF_NAME}.md" ]; then
250
+ BODY_PATH="docs/releases/${GITHUB_REF_NAME}.md"
251
+ fi
252
+ echo "body_path=${BODY_PATH}" >> "$GITHUB_OUTPUT"
253
+
254
+ - name: Create Release
255
+ uses: softprops/action-gh-release@v1
256
+ with:
257
+ files: |
258
+ artifacts/**/*
259
+ body_path: ${{ steps.release_notes.outputs.body_path }}
@@ -0,0 +1,63 @@
1
+ # Rust build artifacts
2
+ /target/
3
+ /ries-py/target/
4
+ **/*.rs.bk
5
+
6
+ # Python artifacts
7
+ __pycache__/
8
+ *.py[cod]
9
+ *$py.class
10
+ *.egg-info/
11
+ .pytest_cache/
12
+ .coverage
13
+ build/
14
+ dist/
15
+ .venv/
16
+ venv/
17
+ env/
18
+
19
+ # Node.js and WASM artifacts
20
+ node_modules/
21
+ package-lock.json
22
+ pkg/
23
+ *.wasm
24
+ test_wasm.js
25
+
26
+ # IDE and editor files
27
+ .idea/
28
+ .vscode/
29
+ *.swp
30
+ *.swo
31
+ *~
32
+ .DS_Store
33
+
34
+ # Debug and profiling
35
+ *.dSYM/
36
+ *.profraw
37
+
38
+ # Temporary files
39
+ *.tmp
40
+ *.bak
41
+ test-results/
42
+ output/
43
+ playwright-report/
44
+ .playwright-mcp/
45
+ .codex-playwright/
46
+
47
+ # Local assistant config
48
+ .claude/
49
+ CLAUDE.md
50
+ .claude/settings.local.json
51
+
52
+ # Local cargo config
53
+ .cargo/
54
+
55
+ # Local binaries
56
+ rust_out
57
+
58
+ # Tool backups
59
+ Cargo.toml.orig
60
+
61
+ # Git worktrees
62
+ .worktrees/
63
+ repomix-output.xml
@@ -0,0 +1,78 @@
1
+ {
2
+ "title": "ries-rs: A Rust Implementation of the RIES Inverse Equation Solver",
3
+ "description": "ries-rs is a Rust implementation of Robert Munafo's RIES (RILYBOT Inverse Equation Solver). Given a numeric target value, it searches for algebraic equations that have the target as a solution. Features include parallel search, automatic differentiation for Newton–Raphson refinement, user-defined constants and functions, multiple output formats, and domain-specific presets for mathematics, physics, and number theory.",
4
+ "license": {
5
+ "id": "MIT"
6
+ },
7
+ "keywords": [
8
+ "inverse symbolic calculator",
9
+ "equation solver",
10
+ "algebraic equations",
11
+ "experimental mathematics",
12
+ "mathematical constants",
13
+ "PSLQ",
14
+ "integer relations",
15
+ "Newton-Raphson",
16
+ "automatic differentiation",
17
+ "Rust"
18
+ ],
19
+ "creators": [
20
+ {
21
+ "name": "Santoro, Maxwell",
22
+ "orcid": "0009-0004-9354-0993",
23
+ "affiliation": "Independent"
24
+ }
25
+ ],
26
+ "contributors": [
27
+ {
28
+ "name": "Munafo, Robert",
29
+ "type": "Other",
30
+ "affiliation": "Author of original RIES"
31
+ },
32
+ {
33
+ "name": "Shoulson, Mark",
34
+ "type": "Other",
35
+ "affiliation": "Maintainer of the clsn/ries GitHub mirror + enhancements"
36
+ }
37
+ ],
38
+ "related_identifiers": [
39
+ {
40
+ "identifier": "https://github.com/maxwellsantoro/ries-rs",
41
+ "relation": "isSupplementTo",
42
+ "resource_type": "software",
43
+ "scheme": "url"
44
+ },
45
+ {
46
+ "identifier": "https://www.mrob.com/pub/ries/",
47
+ "relation": "isDerivedFrom",
48
+ "resource_type": "software",
49
+ "scheme": "url"
50
+ },
51
+ {
52
+ "identifier": "https://github.com/clsn/ries",
53
+ "relation": "isDerivedFrom",
54
+ "resource_type": "software",
55
+ "scheme": "url"
56
+ }
57
+ ],
58
+ "references": [
59
+ "Munafo, R. (2010). RIES - Find Algebraic Equations, Given Their Solution. https://www.mrob.com/pub/ries/",
60
+ "Ferguson, H.R.P., & Bailey, D.H. (1992). A Polynomial Time, Numerically Stable Integer Relation Algorithm. RNR-91-032.",
61
+ "Stoutemyer, D.R. (2024). Computing with No Machine Constants, Only Constructive Axioms. arXiv:2402.03304"
62
+ ],
63
+ "grants": [],
64
+ "subjects": [
65
+ {
66
+ "term": "Computer Science - Symbolic Computation",
67
+ "identifier": "cs.SC"
68
+ },
69
+ {
70
+ "term": "Mathematics - Number Theory",
71
+ "identifier": "math.NT"
72
+ }
73
+ ],
74
+ "language": "eng",
75
+ "access_right": "open",
76
+ "upload_type": "software",
77
+ "notes": "This software implements an inverse symbolic calculator similar to the original RIES by Robert Munafo. It can find algebraic equations given their numeric solutions, making it useful for experimental mathematics, physics, and number theory research. The implementation includes PSLQ integer relation detection, stability analysis for impostor detection, and high-precision verification."
78
+ }