Commit Graph

8 Commits

Author SHA1 Message Date
jason fe1598c890 📝 Fix README accuracy and section order 📝
Audit found three accuracy bugs and one section ordering violation:
- Add wasm-opt (binaryen) to WASM tools table — installed via pkmgr
in 05-custom.sh but was missing from the tools reference entirely
- Fix wasm32-emscripten → wasm32-unknown-emscripten in cross-compile
targets table (wrong triple name)
- Move "Install and run container" (dockermgr) from position 10 to
immediately after "Pull" — both are production install paths and must
appear before the Development section per canonical section order rules
- Rename "Build the image locally" → "Development" to match canonical
section naming; it is the last substantive section before License
- README.md: add binaryen/wasm-opt row to WASM tools table
- README.md: correct wasm32-unknown-emscripten triple
- README.md: move Install and run container section to top (after Pull)
- README.md: rename build section to Development; move to end

README.md
2026-06-21 18:02:47 -04:00
jason a6acb207b6 Native cross-compile stage + sccache on by default
Eliminates QEMU arm64 build (was ~15 hours) by adding a
`rust-tools` stage that mirrors the Go image's `go-tools` pattern:
runs on the build platform (amd64), cross-compiles or downloads all
~50 Rust tools for the target arch, and activates sccache throughout.
Build time for linux/arm64: ~15 hours → ~30–60 minutes.
How it works:
- `FROM --platform=$BUILDPLATFORM rust:alpine AS rust-tools` runs natively
- `cargo binstall --target $RUST_TARGET` fetches GitHub release prebuilts
(zero compilation for most tools)
- Missing prebuilts fall back to `cargo install --target` using the
`aarch64-linux-musl-gcc` cross-toolchain (no QEMU, native speed)
- Native (x86_64) sccache installed as RUSTC_WRAPPER so source-compiled
tools are cached across Docker rebuilds
- `CARGO_INSTALL_ROOT=/rust-tools` keeps tool binaries separate from
rustup shims; `COPY --from=rust-tools /rust-tools/bin/` drops them
into the build stage before `05-custom.sh` runs
Pure-Rust / no-OpenSSL feature flags where possible (CGO=0 equivalent):
- `sqlx-cli`: `--features rustls` (was native-tls)
- `sea-orm-cli`: `--features runtime-tokio-rustls` (was native-tls default)
- `trunk`: already defaults to rustls — no change needed
- `probe-rs`: prebuilt if available, silently skipped otherwise (needs libusb)
sccache is now active by default in all login shells via profile.d/rust.sh
(`RUSTC_WRAPPER=sccache`); opt out with `-e RUSTC_WRAPPER=`.
- Dockerfile: add 110-line rust-tools stage with musl cross-toolchain,
sccache, cargo-binstall, all tool installs for target arch
- Dockerfile: COPY --from=rust-tools before 05-custom.sh RUN step
- Dockerfile: set RUSTC_WRAPPER in build stage; drop unused cargo-registry
and cargo-git cache mounts (no longer needed there)
- rootfs/root/docker/setup/05-custom.sh: remove cargo-binstall bootstrap
and all cargo binstall/install blocks; add RUSTC_WRAPPER to profile.d
- README.md: document rust-tools stage, native cross-compile architecture,
expected build times, sccache-on-by-default, pure-Rust feature flags,
updated cache mount ID table

Dockerfile
README.md
rootfs/root/docker/setup/05-custom.sh
2026-06-21 17:58:20 -04:00
jason 20cd92f941 📝 Fix README accuracy: rust-workflow invocation and cache mount IDs 📝
Two inaccuracies corrected:
- rust-workflow is not run automatically on `docker run` with no args;
the container starts in monitoring mode and rust-workflow must be
called explicitly — update all examples to pass `rust-workflow` as
the command argument and rename the section heading accordingly
- Cache mount IDs in the BuildKit section were missing the per-arch
suffix; corrected to apk-cache-<arch>, cargo-git-<arch>,
rustup-downloads-<arch>, sccache-build-<arch> and added a note
explaining why per-arch IDs are used in multi-platform builds
- README.md: fix default-behavior section and cache mount ID table

README.md
2026-06-21 17:32:45 -04:00
jason d917070c1a 🗃️ Could you paste the actual diff content? 🗃️
Could you paste the actual diff content?

Dockerfile
README.md
2026-05-31 23:21:21 -04:00
jason 293247c98c 📝 rewrite README and fix setup script tool installs 📝
- README rewritten from 137 → 439 lines: full tool tables, env var reference, volume/cache guide, cross-compile target matrix, sccache remote backend docs, BuildKit cache mount info
- Update image name from `casjaysdevdocker/rust` to `casjaysdev/rust` throughout
- Add `clang-dev`, `llvm-dev`, `openssl-libs-static` to build deps; add `perf` (non-fatal) for flamegraph/samply support
- Fix rustup nightly component flag syntax (split into two `--component` flags)
- Move `cargo-nextest` to fallback block with `--locked`; rename `typos` → `typos-cli` and `cargo-flamegraph` → `flamegraph` to match correct crate names

README.md
rootfs/root/docker/setup/05-custom.sh
2026-05-31 20:52:51 -04:00
jason dcb16d9762 📝 Rewrite README.md with full documentation 📝
Complete rewrite of README.md to document the default rust-workflow
behavior, all installed tools (organized by category), the full cache
strategy (BuildKit mounts + runtime volumes + sccache), cross-compile
targets and tooling, miri usage, environment variables, and docker-compose
example with all volumes wired up.
- README.md: add default-workflow quickstart; add tool tables for linting,
formatting, testing, coverage, benchmarking, profiling, fuzzing,
debugging, inspection, build/release, cross-compile, WASM, docs, and
dev-loop categories; add cache section covering BuildKit --mount cache
IDs, named volumes, host bind mounts, sccache activation and remote
backends; add cross-compile section with pure-Rust/zigbuild/cross usage
and caveats table; add miri section; update env vars table with
SCCACHE_DIR, CARGO_INCREMENTAL, RUSTC_WRAPPER, CARGO_WORKDIR,
CARGO_BUILD_TARGET; update docker run and docker-compose examples to
include all three volumes

README.md
2026-05-31 11:47:18 -04:00
jason 3514fc596f 🗃️ readme: rename rootfs/ to volumes/ for compose context 🗃️
Aligns README install/run snippets with the new convention split:
rootfs/ for Dockerfile-build content (image filesystem), volumes/
for docker-compose host bind-mounts. Compose mounts, host bind
paths, and runtime data dirs are renamed; Dockerfile COPY/ADD
sources (where present) are preserved.

README.md
2026-05-05 14:36:27 -04:00
jason db7d7dba0e 🦈🏠🐜 Initial Commit 🐜🦈🏠 2026-05-01 06:43:50 -04:00