Skip to content

Build: stable Rust 1.99.1 for the ARM and host builds, no nightly or build-std - #816

Merged
GLinnik21 merged 5 commits into
mainfrom
research/stable-rust
Oct 16, 2026
Merged

GLinnik21 merged 5 commits into
mainfrom
research/stable-rust

Conversation

@GLinnik21

@GLinnik21 GLinnik21 commented Oct 16, 2026 •

Copy link
Copy Markdown
Collaborator

Closes #784. Part of #768.

What

The ARM build moves from nightly Rust with -Z build-std on arm-unknown-linux-gnueabi to stable Rust 1.99.1 on armv7-unknown-linux-gnueabi, using the prebuilt std.

  • One toolchain pin: rust-modules/rust-toolchain.toml.

    • The Makefile, the CI workflows, the host-rust action, setup and the skills all read it.
    • Host gates run on the same stable toolchain.
    • -Zthreads is opt-in (HOST_THREADS) and needs nightly.
  • Codegen flags: -C target-cpu=cortex-a9 -C target-feature=-neon,-soft-float -C force-frame-pointers=yes.

    • rustc warns that soft-float is an unstable target feature whose behaviour may change. That is guarded:
      • ci/check-vfp.py compiles a probe with the Makefile's exact flags and asserts VFP instructions are emitted. It has a negative control and runs in make check and CI.
      • ci/check-elf.sh checks the ratio of VFP instructions to __aeabi_* float calls in the linked binary.
    • The only soft-float calls left are about five, in the prebuilt core's float parsing.
  • GPL source rebuild and notices:

    • The source-rebuild scripts and build-package.yml name the pinned toolchain. Rebuilding no longer needs rust-src or build-std.
    • The notices take std's dependency lock from the same toolchain.
  • Host checks against the built binary: no CP15 barriers, the same DT_NEEDED, GLIBC symbol versions at most 2.12, and the fwcompat matrix passes. The prebuilt 1.99.1 std has no CP15 mcr barriers, and 1059 of its 1075 prologues push {…r11, lr}, so the crash walker's frame chain holds.

  • Simulator builds and repo scripts run from the repo root (the Makefile sim targets, ci/gen-third-party-notices.py, ci/mkmacapp.py, tests/paging_link.py) and now name the pin explicitly.

  • Shipped size (CI ipk artifacts, cross-build, main 635b51a vs this PR):

    main (nightly build-std) this PR (stable 1.99.1) delta
    ipk 19,269,278 19,054,556 -1.1%
    plxnative (stripped) 13,607,248 13,263,208 -2.5%
    .text 11,502,512 11,182,800 -319,712
    .ARM.extab 540,092 522,856 -17,236
    plxnative-storage 1,298,904 1,229,684 -5.3%

Verification

  • Targeted ci/ and tools/ tests pass.
  • --no-default-features check passes on armv7 with 1.99.1.
  • CI is green on cfbd80f: both required checks, both simulator builds and the bundled-FFmpeg macOS tests.
  • TV (stable 8cf882f, ARM_PROFILE=release, guest + mock, panel off, muted):
    • Boot: no SIGILL; Home at 60 loop/s.

    • Playback: pipe_h264_ac3_1080p 24.0 fps, pipe_h264_aac_mp4 24.1, pipe_hevc_eac3_4k_hdr10 24.0, pipe_seek_inplace 24.4, all with 0 dropped. A mock direct-play title rendered its text subtitle with 0 dropped.

    • FPS, stable vs main (main ran about 30 min later):

      scene stable worst ms / late / fps main worst ms / late / fps
      home-grid 95.2 / 24 / 52.5 121.7 / 27 / 53.2
      library-scroll 137.9 / 47 / 58.4 110.4 / 45 / 58.1
      show-detail 118.7 / 60 / 58.1 100.7 / 62 / 58.1
      item-menu 130.2 / 10 / idle 131.7 / 11 / idle
      library-burst 129.9 / 155 / 49.8 91.6 / 173 / 49.7
      hero-pong 156.9 / 44 / 59.6 112.6 / 46 / 59.1

      hero-pong misses its bench_missed_max=0 on both builds (5 missed refreshes on stable, 11 on main), so that is not caused by this change.

    • Crash:

      • crashtest=unwind walks 11 frames through std's panic path.
      • A kill -SEGV of the playing app walks its other threads through std's thread_start.
      • About 15 gst/media threads had 0 frames (ptrace "did not stop"). Main was not compared for this.
    • Not run: the scenes that need a real server, and a picture check (panel off).

Build bench

make build-bench --only noop,leaf,ui,hub,tests,sizes --runs 3, Apple M4, warm, merge-base b88c310 vs cfbd80f. The base front end used -Zthreads (8 threads); stable runs it serially, so the plx_ui rows are not like-for-like. -Zthreads stays available behind HOST_THREADS on a nightly toolchain. The ARM staticlib row was not run.

Scenario base (nightly, 8 threads) this PR (stable 1.99.1)
No-op host test build 0.1 s 0.1 s
Edit leaf plx_base cbuf.rs 22.9 s 22.0 s
Edit leaf plx_ui dwell.rs 9.4 s 11.1 s
Edit hub plx_ui lib.rs 9.0 s 11.1 s
Unit suite (default features) 57.9 s, 8085 passed 37.9 s, 8085 passed
rust-modules/target 2022 MB 3754 MB

🤖 Generated with Claude Code

GLinnik21 and others added 5 commits October 16, 2026 15:32
…tly or build-std

One toolchain pin, rust-modules/rust-toolchain.toml. The ARM build uses
armv7-unknown-linux-gnueabi and its prebuilt ARMv7 std, so no -Z build-std
and no rust-src for the build; codegen flags and target are unchanged.

- Makefile reads the channel into RUST_TOOLCHAIN and passes +$(RUST_TOOLCHAIN)
  to every cargo call (a +toolchain on the command line outranks the file);
  CI reads it through the new .github/actions/rust-toolchain; ci/rust_toolchain.py
  serves the Python gates. setup-env installs it (setup-rust). HOST_THREADS
  (-Zthreads) is opt-in and an error on a non-nightly toolchain.
- ci/check-vfp.py (make check + CI host-lint) fails when rustc stops honouring
  the unstable -C target-feature=-soft-float, with a negative control;
  check-elf.sh repeats the count on the linked binary.
- GPL source rebuild names and verifies the stable toolchain; rust-src is
  bundled only as the corresponding source of the prebuilt std and is not a
  rebuild input (restore requires the prebuilt std, sysroot copy excludes src).
- Notices: toolchain pin and std_lock re-derived from 1.99.1 (compiler_builtins
  is a path member of std's workspace), generator reads rust-toolchain.toml.
- Docs, skills, hooks and comments updated; unit-graph tests use
  RUSTC_BOOTSTRAP=1 for their read-only -Zunstable-options query.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…comments, sim builds and root-cwd cargo calls use the pin

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@GLinnik21
GLinnik21 marked this pull request as ready for review October 16, 2026 14:14
@GLinnik21
GLinnik21 merged commit e351f56 into main Oct 16, 2026
26 checks passed
@GLinnik21
GLinnik21 deleted the research/stable-rust branch October 16, 2026 14:14
GLinnik21 added a commit that referenced this pull request Oct 16, 2026
…VFP (#821)

With stable Rust's prebuilt compiler_builtins, every libm name the app calls (roundf, round, floorf, ceilf, ceil, trunc, fmodf, fmod, cbrtf, sqrtf, sqrt, fma) bound to compiler_builtins' weak soft-float copy, because $(RUST_LIB) preceded -lm; nanosvg's C calls went soft too. -lm now links first, so they resolve to the TV's glibc libm (VFPv3, softfp ABI): soft arithmetic libcalls 57 -> 9 (core's prebuilt float parsing), 0 local libm bodies, 11 math names UND @GLIBC_2.4, VFP counts unchanged, 128 KB smaller, DT_NEEDED unchanged, fwcompat unchanged on every gated release. ci/check-elf.sh now fails on a local libm body or more than 16 soft arithmetic calls (red on the old binary, green on the new; test_check_elf.py 20 OK).

Part of #768. Follow-up to #816.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
GLinnik21 added a commit that referenced this pull request Oct 16, 2026
The allowlist named cargo +nightly check … --no-default-features; since #816 there is no nightly and AGENTS.md spells the check cargo +$(make -s print-rust-toolchain), so it prompted. The entry now reads cargo +* check ….

Part of #768.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
danzig666 pushed a commit to danzig666/plx-native that referenced this pull request Oct 18, 2026
The sideload workflow installed nightly-2026-07-02 for the release-features
check and the package build; upstream moved to stable Rust 1.99.1 with the
prebuilt armv7 std (plxnative#816), so it now uses ./.github/actions/rust-toolchain
and the RUST_TOOLCHAIN that action exports, like ci.yml.

The fork's BACK test set up a scrub target; upstream's BACK now cancels a
live scrub first (key_back_scrub), so the test starts without one and
keeps grading the fork's additions (the jitter gate, the second BACK).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01KBgjCe8KH6Nnp3K51Fybrv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Research: build the ARM target on stable Rust (armv7-unknown-linux-gnueabi) instead of nightly + build-std

1 participant