Metadata-Version: 2.5
Name: rustc-bin
Version: 1.100.0.post3
Summary: Prebuilt Rust toolchain
Project-URL: Repository, https://github.com/Baba01hacker666/rust-bin
Author: baba01hacker
License-Expression: MIT
License-File: LICENSE
Keywords: binary,cargo,packaging,prebuilt,rust,rustc,toolchain
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Rust
Requires-Python: >=3.6
Requires-Dist: rustc-bin-driver==1.100.0.post3
Requires-Dist: rustc-bin-llvm==1.100.0.post3
Description-Content-Type: text/markdown

# Prebuilt Rust toolchain

This package provides a prebuilt Rust toolchain (rustc, cargo) for integrating
Rust artifacts into Python projects. Installing `rustc-bin` pulls in the two
companion distributions automatically, so users only ever install one package.

A single PyPI wheel would exceed PyPI's default 100 MB per-file upload limit
(the full x86_64 Linux toolchain is about 198 MB), and getting that limit raised
takes weeks. Splitting the payload into three wheels keeps every upload well
below the limit while `pip install rustc-bin` still installs the whole toolchain:

- `rustc-bin` — compiler binaries, standard library and launcher (~64 MB; uses the system linker)
- `rustc-bin-llvm` — LLVM runtime library (only where LLVM is not statically linked, ~63 MB)
- `rustc-bin-driver` — Rust compiler driver library (~61 MB)

All wheels install into the same `rust/` package directory and are merged at
install time.

## Using the binaries

```
uvx --from=rustc-bin cargo build
uvx --from=rustc-bin rustc --version
```

## Building the wheels locally

Each part is built separately for a target:

```
RUST_PART=main RUST_TARGET=x86_64-unknown-linux-gnu \
  WHEEL_TAG=manylinux_2_17_x86_64 GITHUB_REF_NAME=v1.100.0 uv build --wheel

cd packages/rustc-bin-llvm
RUST_PART=llvm RUST_TARGET=x86_64-unknown-linux-gnu \
  WHEEL_TAG=manylinux_2_17_x86_64 GITHUB_REF_NAME=v1.100.0 uv build --wheel

cd ../rustc-bin-driver
RUST_PART=driver RUST_TARGET=x86_64-unknown-linux-gnu \
  WHEEL_TAG=manylinux_2_17_x86_64 GITHUB_REF_NAME=v1.100.0 uv build --wheel
```

The `llvm` part is skipped for targets where LLVM is statically linked (i686,
musl and Windows); `rustc-bin` omits that dependency automatically on those
targets. The build hook downloads the llvm-tools component at build time to
strip every shipped ELF file; the stripper itself is not shipped. Windows PDB
debug symbols and the bundled LLD tools are dropped to stay under PyPI's
per-file limit — rustc uses the system linker by default.

## Publishing

Pushing a `v*.*.*` tag builds every wheel and publishes it with trusted
publishing. PyPI identifies a trusted publisher by repository, workflow and
environment and ignores the project name, so each of the three projects is
published by its own job with its own environment:

| Project            | Environment   |
| ------------------ | ------------- |
| `rustc-bin`        | (none)        |
| `rustc-bin-llvm`   | `pypi-llvm`   |
| `rustc-bin-driver` | `pypi-driver` |

If PyPI rejects the `rustc-bin-driver` publisher again, rename the project in
`packages/rustc-bin-driver/pyproject.toml` (and the matching dependency in
`hatch_build.py`) to `compiler-driver-runtime` and re-run the release.

`rustc-bin` is published only after both companions, so its dependencies always
exist on PyPI by the time it lands. Re-running a release is safe: uploads use
`--check-url`, which skips files that are already on the index.
