| Crates.io | xcargo |
| lib.rs | xcargo |
| version | 0.1.0 |
| created_at | 2025-11-18 23:18:01.807722+00 |
| updated_at | 2025-11-19 00:34:45.473874+00 |
| description | Cross-compilation, zero friction - Rust cross-compilation tool with automatic toolchain management |
| homepage | https://ibrahimcesar.github.io/xcargo |
| repository | https://github.com/ibrahimcesar/xcargo |
| max_upload_size | |
| id | 1939118 |
| size | 178,738 |
Cross-compilation, zero friction
xcargo is a Rust cross-compilation tool that simplifies building for multiple targets. Automatic toolchain management, intelligent container usage, and zero-configuration cross-compilation.
Cross-compilation in Rust shouldn't be painful. xcargo automates the entire process:
Work in Progress - Early development
Current version: 0.1.0-alpha
# Initialize cross-compilation for your project
xcargo init
# Add target platforms
xcargo target add windows linux macos
# Check what's needed
xcargo doctor
# β
windows-x86_64: Ready
# β linux-arm64: Missing linker (install: apt install gcc-aarch64-linux-gnu)
# β οΈ macos-aarch64: Requires macOS host for native compilation
# Build for all configured targets
xcargo build --all
# Build for specific target
xcargo build --target x86_64-pc-windows-gnu
# Or use as cargo wrapper
xcargo cargo build --target x86_64-pc-windows-gnu
# Not yet published - coming soon!
cargo install xcargo
# Or build from source:
git clone https://github.com/ibrahimcesar/xcargo
cd xcargo
cargo build --release
See TARGETS.md for the complete list.
Tier 1 (Native builds):
Tier 2 (Container builds):
Tier 3 (Specialized):
βββββββββββββββββββββββββββββββββββ
β xcargo build --target windows β
ββββββββββββββ¬βββββββββββββββββββββ
β
βΌ
βββββββββββββββββ
β Can compile β
β natively? β
βββββ¬ββββββββ¬ββββ
β β
YESβ βNO
β β
βΌ βΌ
ββββββββββ ββββββββββββββββββββ
β Native β β Need container? β
β build β β Check deps... β
ββββββββββ ββββββ¬ββββββββββββββ
β
βΌ
βββββββββββββββββ
β Use youki β
β (embedded) β
βββββββββββββββββ
# Build for Windows from Linux
xcargo build --target x86_64-pc-windows-gnu
# Build for Linux ARM
xcargo build --target aarch64-unknown-linux-gnu
# Build for all targets
xcargo build --all
# xcargo.toml
[targets]
default = ["x86_64-unknown-linux-gnu", "x86_64-pc-windows-gnu"]
[profiles.release-all]
targets = [
"x86_64-unknown-linux-gnu",
"x86_64-pc-windows-gnu",
"x86_64-apple-darwin",
]
[build]
parallel = true
cache = true
[container]
runtime = "auto" # auto, youki, docker, podman
use-when = "target.os != host.os"
# .github/workflows/build.yml
name: Cross-Platform Build
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install xcargo
run: cargo install xcargo
- name: Build all targets
run: xcargo build --all
- name: Upload artifacts
run: xcargo release --upload
Make cross-compilation boring (in a good way):
| Feature | xcargo | cross | cargo-zigbuild | Manual |
|---|---|---|---|---|
| Native builds | β First | β | β οΈ Via Zig | β |
| Container fallback | β | β | β | β |
| No Docker required | β youki | β | β | β |
| Auto-setup | β | β | β οΈ | β |
| Native deps | β Planned | β οΈ | β | β οΈ |
| CI/CD templates | β Planned | β οΈ | β | β |
Contributions welcome! This project is in early stages.
How to help:
Inspired by:
xcargo - Cross-compilation, zero friction π―
Status: π§ Pre-alpha - Architecture planning
Star β this repo to follow development!