1 unstable release
Uses new Rust 2024
| new 0.1.0 | Oct 23, 2025 |
|---|
#2 in #vendor
26KB
522 lines
wally-vendor
A fast and simple utility for vendoring Wally-installed dependencies anywhere in your project. This tool will copy packages from any specified realm (Packages/, ServerPackages/, DevPackages/, or auto-detected) into their own vendor directories (or throw them all into one directory).
Note: This tool is not an official affiliate of Wally. It is, however, meant to interact with the outputs of Wally.
Installation
With Rokit
rokit add sequesteredone/wally-vendor
rokit install
With Crates.io
cargo install wally-vendor
From GitHub Releases
Pre-built binaries for Windows, Linux, and macOS are available on the Releases page.
From Source
After cloning the repository run:
cargo install --path .
Common Usage
(For a full list of options, please use wally-vendor --help, or wally-vendor <COMMAND> --help)
Nagivate to your project directory (the one containing wally.toml) and run sync command:
wally-vendor sync
This will read your wally.toml file, find the installed packages, and copy them into a WallyVendor directory by default.
Advanced Usage
Custom Vendor Directories
To change the default vendor directory, you can pass command line arguments:
wally-vendor sync --shared-dir "path/to/shared" --server-dir "path/to/server" --dev-dir "path/to/dev"
Or use a single directory for all dependencies:
wally-vendor sync --vendor-dir "path/to/all"
Configuration File
To avoid passing arguments every run, you can add a [wally-vendor] section to your wally.toml:
[wally-vendor]
shared-dir = "path/to/shared"
server-dir = "path/to/server"
dev-dir = "path/to/dev"
Using a Separate Configuration File
If you want to vendor only specific dependencies, you can create a wally-vendor.toml file that mimics the structure of wally.toml:
[wally-vendor]
shared-dir = "src/shared/SharedPackages"
server-dir = "src/server/ServerPackages"
dev-dir = "src/shared/DevPackages"
[dependencies]
promise = "evaera/promise@4.0.0"
janitor = "howmanysmall/janitor@1.18.3"
[server-dependencies]
profilestore = "lm-loleris/profilestore@1.0.3"
[dev-dependencies]
jest = "jsdotlua/jest@3.10.0"
If both wally.toml and wally-vendor.toml exist, the tool will prioritize wally-vendor.toml.
Additional Options
- Clean vendor directories before syncing:
wally-vendor sync --clean
- Fail if any required dependency is missing:
wally-vendor sync --strict
- Limit to specific realms:
wally-vendor sync --realm server --realm shared
(This will not sync the dev realm)
Features
-
Uses rayon for parallel processing when copying dependencies. (tokio was considered, and tested but provided slower benchmarks. A branch containing the tokio implementation can be found, incase it could be further optimized.)
-
Avoids re-copying files that haven't changed for incremental updates.
-
Reads
wally.lock(lockfile) to vendor exact package versions for deterministic outputs. (Will proceed anyways without a lockfile, unless the--lockedflag is provided)
Dependencies
~2.8–5.5MB
~107K SLoC