@zackees/soldr 0.7.96 → 0.7.98
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.
- package/README.md +39 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -196,6 +196,45 @@ soldr cargo-dylint check
|
|
|
196
196
|
soldr rustfmt src/main.rs
|
|
197
197
|
```
|
|
198
198
|
|
|
199
|
+
## Use soldr as your PEP 517 build backend (instead of maturin)
|
|
200
|
+
|
|
201
|
+
For Rust+Python packages, point `pyproject.toml` at soldr instead of
|
|
202
|
+
maturin and `pip install .` / `uv pip install .` route the whole build
|
|
203
|
+
through soldr:
|
|
204
|
+
|
|
205
|
+
```toml
|
|
206
|
+
[build-system]
|
|
207
|
+
requires = ["soldr"]
|
|
208
|
+
build-backend = "soldr"
|
|
209
|
+
|
|
210
|
+
# Your existing [tool.maturin] section stays exactly as it is —
|
|
211
|
+
# soldr drives a pinned maturin under the hood, so all maturin
|
|
212
|
+
# configuration keeps working unchanged.
|
|
213
|
+
[tool.maturin]
|
|
214
|
+
manifest-path = "crates/my-crate/Cargo.toml"
|
|
215
|
+
module-name = "my_pkg._native"
|
|
216
|
+
python-source = "src"
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
That is the entire change — no `maturin` entry in `requires`, no other
|
|
220
|
+
files touched. What you get over `build-backend = "maturin"`:
|
|
221
|
+
|
|
222
|
+
- **Pinned maturin, fetched on demand** — soldr downloads a pinned
|
|
223
|
+
maturin binary (or provisions the PyPI wheel in an isolated
|
|
224
|
+
uv-managed env if the binary fetch misses). Reproducible across
|
|
225
|
+
machines; nothing to add to your dependencies.
|
|
226
|
+
- **Toolchain pinning** — the build uses the rustup toolchain your
|
|
227
|
+
`rust-toolchain.toml` declares (MSVC on Windows), even when a stray
|
|
228
|
+
GNU cargo or mingw shadows it on `PATH`.
|
|
229
|
+
- **Managed cmake + ninja** — cmake-based `*-sys` crates
|
|
230
|
+
(`libz-ng-sys`, `zstd-sys`, ...) configure with pinned tools from the
|
|
231
|
+
soldr toolchain archive instead of whatever `cmake`/`make` your
|
|
232
|
+
`PATH` happens to serve.
|
|
233
|
+
- **Compilation caching** — rustc invocations run under soldr's
|
|
234
|
+
`RUSTC_WRAPPER`, so repeat builds hit the cache.
|
|
235
|
+
|
|
236
|
+
soldr's own wheel is built this way (see this repo's `pyproject.toml`).
|
|
237
|
+
|
|
199
238
|
## How it works
|
|
200
239
|
|
|
201
240
|
soldr is a **chameleon binary**: one executable that picks its role from `argv[1]` on every invocation. Three roles:
|