Remove the Go implementation; build and release the Rust version for every OS #2

Merged
andydixon merged 12 commits from rust-port into master 2026-10-08 22:25:29 +02:00
12 Commits
Author SHA1 Message Date
Andy Dixon 82dfab3dff Fix CI: pin Rust 1.99, newer clippy lints, Windows/macOS test portability, NetBSD libexecinfo for cross 2026-10-08 20:32:29 +01:00
Andy Dixon e3bfc28d71 Docs and metadata: per-OS platform notes, package description 2026-10-08 20:12:37 +01:00
Andy Dixon b21bcedba0 Filter globs: no backslash escapes on Windows
Query validation now matches platform::glob_match, where '\' is the path
separator on Windows rather than an escape.
2026-10-08 20:10:18 +01:00
Andy Dixon 9179281a94 Describe behaviour directly instead of by reference to the Go version
- platform::mode documents the on-disk mode-bit layout (bits 31..19 =
  d a l T L D p S u g c t ?, low 9 bits = permissions).
- The snapshot module documents the LEB128 / zig-zag varints and the RFC
  3339 JSON timestamps, and states that snapshots written by mapsize 1.x
  load unchanged.
- Renames: GoTime -> JsonTime, go_duration -> fmt_duration, fixture
  testdata/go.msz -> testdata/v1.2.0.msz (a snapshot written by mapsize
  1.2.0), loads_go_snapshot -> loads_1_2_snapshot.
- --log / --log-level help says they are accepted and ignored.
2026-10-08 20:08:34 +01:00
Andy Dixon fcac50bae6 Build and behave correctly on every release target
Split platform into a portable core (mod.rs) plus unix.rs and windows.rs.

- Linux: statx through syscall(2) so static musl links (fstatat fallback
  on ENOSYS); virtual-fs detection compares f_type as u32.
- macOS: Finder trash (~/.Trash or /Volumes/X/.Trashes/<uid>, "name N"
  collisions, EXDEV falls through to the next location) and `open -R`
  reveal; never headless.
- FreeBSD/NetBSD: fstatat with birth time; trash and reveal unsupported,
  permanent delete still available on headless systems.
- Windows: std read_dir and metadata, allocated size unknown, no inode
  identity, Recycle Bin via SHFileOperationW (FOF_ALLOWUNDO, all
  architectures), Explorer /select reveal, no permanent delete, '\\'
  separator with Windows glob semantics, abs paths via GetFullPathNameW,
  config in %AppData%.
- Local time via a portable LocalTime helper (localtime_r tm_gmtoff on
  Unix, SystemTimeToTzSpecificLocalTime on Windows) replacing libc tm and
  mktime in the TUI, snapshot and filter code.
- errno, stat field names and mode_t width handled per OS; Unix-only
  tests gated; clippy clean on all targets.

Adds windows-sys =0.61.2 (Windows only; Win32_Foundation,
Win32_System_Time, Win32_UI_Shell), already in the lockfile via crossterm.
2026-10-08 20:06:22 +01:00
Andy Dixon a16c00671b Apply rustfmt to the crate 2026-10-08 20:05:25 +01:00
Andy Dixon b1fdb48c4b release.sh: keep the previous package file names 2026-10-08 19:59:00 +01:00
Andy Dixon c3ed83250b Docs: architecture, development and performance for the Rust implementation 2026-10-08 19:56:43 +01:00
Andy Dixon 01785850bf Port treegen to a cargo example 2026-10-08 19:54:56 +01:00
Andy Dixon ce8acf0ade Build, test and release with cargo: CI, release workflow, cross-build and packaging scripts, Homebrew 2026-10-08 19:54:56 +01:00
Andy Dixon 507f635b49 Make the Rust implementation the only one: crate at the root, Go tree removed 2026-10-08 19:51:33 +01:00
Andy Dixon 7e3be19a2b rust: re-run benchmarks on a quieter host 2026-10-08 19:11:55 +01:00