app: cherry-pick rune's pause and sound fixes onto the checkout

Rune comes from app/vendor/rune now, a checkout of 63ad0209 on branch
ported, carrying the four commits of upstream issues 1320 (a pause while
a clip is layered holds the layer's picture and time) and 1325 (a video's
sound is read ahead of the clock and leads it). Both were written against
eb9f1104 and ported across the refactors since. The faults are the first
two and the third in docs/rune-upstream.md; the app's workarounds in
review.rs stay until the fixes arrive upstream.
This commit is contained in:
vhaudiquet committed 2026-11-22 22:16:30 +01:00
1 parent 80fef698ce
commit 5bf262b82b
3795 files changed
+663463 -28

No files matched your search

+292
View File
@@ -0,0 +1,292 @@
[workspace]
resolver = "3"
members = [
"crates/rune",
"crates/rune-core",
"crates/rune-edit",
"crates/rune-gpu",
"crates/rune-image",
"crates/rune-media",
"crates/rune-spell",
"crates/rune-text",
"crates/rune-ref",
"crates/rune-motion",
"crates/rune-i18n",
"crates/rune-staging",
"crates/rune-kit",
"crates/rune-highlights",
"crates/rune-fx",
"crates/rune-light",
"crates/procwatch",
"crates/rune-register",
"crates/rune-knobs",
"crates/rune-mac",
"crates/rune-notify",
"crates/rune-mermaid",
"crates/rune-perf",
"crates/rune-luau",
"crates/rune-taffy",
"themes/opencode",
"examples/hello",
"examples/web-hello",
"examples/web-showcase",
"www/app",
"examples/todo",
"examples/settings",
"examples/playground",
"examples/knobs",
"examples/kit-gallery",
"examples/background",
"examples/live-values",
"examples/shapes",
"examples/overlay",
"examples/overlay-lab",
"examples/lab",
"examples/showreel",
"examples/video-player",
"examples/video-tiles",
"examples/cursed-settings",
"examples/drag-out",
"examples/sketch",
"examples/drop-files",
"examples/rich-clipboard",
"examples/matched",
"examples/launcher",
"examples/glass-card",
"examples/glass-panel",
"examples/frosted-bar",
"examples/odometer",
"examples/motion-bento",
"examples/motion-bento/chaos",
"examples/site-scenes",
"examples/luau-panel",
]
# Default cargo check/test targets: the core framework, libraries and theme.
# Excludes examples/*, www/app, rune-luau (C++ Luau build via cc/mlua), rune-notify/rune-mac
# (WinRT features on `windows`), rune-ref (`libm/force-soft-floats` and `serde/derive`), and
# rune-i18n (`icu_provider/sync`, `writeable/default`, `smallvec/const_generics`); pass
# `--workspace` to check everything.
default-members = [
"crates/rune",
"crates/rune-core",
"crates/rune-edit",
"crates/rune-gpu",
"crates/rune-image",
"crates/rune-media",
"crates/rune-spell",
"crates/rune-text",
"crates/rune-motion",
"crates/rune-staging",
"crates/rune-kit",
"crates/rune-highlights",
"crates/rune-fx",
"crates/rune-light",
"crates/procwatch",
"crates/rune-register",
"crates/rune-knobs",
"crates/rune-mermaid",
"crates/rune-perf",
"crates/rune-taffy",
"themes/opencode",
]
exclude = ["tools/rune-dev-guard", "tools/ratex-math-wasm", "tools/ratex-math-wasm/pack", "vendor/accesskit_macos", "vendor/accesskit_windows", "vendor/parley_engine", "vendor/sctk-adwaita", "vendor/tiny-skia-path", "vendor/wgpu-hal", "vendor/winit"]
# wgpu-hal as published plus `vendor/wgpu-hal.patch`: `dx12::Instance::expose_adapter` (a `wgpu::Adapter` for the
# one adapter Rune picks through DXGI, with no device made on the others, `crates/rune-gpu/src/pick.rs`), FXC loaded on
# the first compile rather than with the instance (Rune's uber shader is precompiled), partial presents
# (`Surface::set_present_rects`: `Present1` dirty rectangles on a sequential flip-model swap chain, for
# `render::damaged`), Windows system DLLs (`d3d12.dll`, `dxgi.dll`, `dcomp.dll`, `d3dcompiler_47.dll`,
# `opengl32.dll`) loaded with `LOAD_LIBRARY_SEARCH_SYSTEM32`, a removed D3D12 device's work left
# pending rather than read as finished (`Device::reached`; Rune sees the removal through
# `rune_gpu::health::removed`), and GPU-written drain markers (`WriteBufferImmediate`) on software
# adapters (`DXGI_ADAPTER_FLAG_SOFTWARE`, WARP) so releasing a removed WARP device or unconfiguring
# its surface waits until queued command lists finish executing instead of freeing resources under
# its worker threads (`DrainTracker`; hardware adapters pay zero marker cost, while skipping
# `ExecuteCommandLists` and `allocator.Reset()` once removed on every adapter). Re-made by
# `scripts/vendor-wgpu-hal.sh <version>` when wgpu is bumped. An app that builds Rune patches it too:
# a dependency's `[patch]` doesn't apply to the workspace that depends on it.
[patch.crates-io]
wgpu-hal = { path = "vendor/wgpu-hal" }
# winit as published plus `vendor/winit.patch`: on Windows a new window isn't added again to the
# taskbar it's already on (that took CoInitializeEx and a TaskbarList COM object, about 7,800 µs
# and nine shell DLLs, before every window's first frame), a window given a position is made there, so it is
# born at that display's scale instead of crossing to it and being resized, and Windows system DLLs
# (`uxtheme.dll`, `user32.dll`, `shcore.dll`, `ntdll.dll`) load via `LoadLibraryExA` with
# `LOAD_LIBRARY_SEARCH_SYSTEM32`; and
# `WindowExtWayland::content_corner_radius` tells an app the radius its content leaves its bottom
# corners to while a client-side frame rounds the window (see `vendor/sctk-adwaita`). Re-made by
# `scripts/vendor-winit.sh <version>` when winit is bumped; apps that build Rune patch it too.
winit = { path = "vendor/winit" }
# sctk-adwaita as published plus `vendor/sctk-adwaita.patch`: the visible one-point border a
# Wayland client-side frame draws follows the window's rounded bottom corners, as the headerbar it
# draws above them rounds the top two, instead of drawing a square L over the shadow's rounded
# cut-out; and `AdwaitaFrame::content_corner_radius` says what radius the content's own bottom
# corners take, for the app to clear outside (`window/surface/corners.rs`). Re-made by
# `scripts/vendor-sctk-adwaita.sh <version>` when sctk-adwaita is bumped; apps that build Rune
# patch it too.
sctk-adwaita = { path = "vendor/sctk-adwaita" }
# parley_engine as published plus `vendor/parley_engine.patch`: UAX #9 rule L1 for a paragraph's
# trailing whitespace and isolates (BidiTest.txt 770,241 of 770,241; 644,283 without it), and
# shaping that stops redoing work from the same inputs: an analyzer keeps the ICU segmenters it
# made, and a run's or a style's font metrics are made once per font instance and size (14% off
# a text's shaping, layouts identical). Re-made by `scripts/vendor-parley-engine.sh <version>` when parley is bumped; apps that build
# Rune patch it too.
parley_engine = { path = "vendor/parley_engine" }
# accesskit_windows as published plus `vendor/accesskit_windows.patch`: headings and landmarks reach
# UI Automation (HeadingLevel, LandmarkType, LocalizedLandmarkType), which Narrator's and NVDA's
# heading and landmark navigation read; and a field past Rune's 64 KiB text-run limit keeps its text
# pattern, its lines answered from its value when a reader asks (`src/long_text.rs`). Re-made by
# `scripts/vendor-accesskit-windows.sh <version>`
# when AccessKit is bumped; apps that build Rune patch it too.
accesskit_windows = { path = "vendor/accesskit_windows" }
# accesskit_macos as published plus `vendor/accesskit_macos.patch`: headings reach NSAccessibility as
# AppKit's `AXHeading` with their level as the value (the published role, `Heading`, is none VoiceOver
# knows), so VoiceOver's rotor and VO-Command-H find them and say their level; and the accessibility
# children, focused element and hit test leave the adapter alone off the main thread, which AppKit
# calls them on while the process queries itself, so they answer from the superclass instead of
# racing or panicking on the main thread's borrow; and a field past Rune's 64 KiB text-run limit keeps
# its line, string and selection ranges, answered from its value when a reader asks. Re-made by
# `scripts/vendor-accesskit-macos.sh <version>` when AccessKit is bumped; apps that build Rune patch it too.
accesskit_macos = { path = "vendor/accesskit_macos" }
[workspace.package]
edition = "2024"
license = "MIT"
[workspace.dependencies]
# Internal workspace crates.
procwatch = { path = "crates/procwatch" }
rune = { path = "crates/rune", default-features = false }
rune-core = { path = "crates/rune-core" }
rune-edit = { path = "crates/rune-edit" }
rune-fx = { path = "crates/rune-fx" }
rune-gpu = { path = "crates/rune-gpu", default-features = false }
rune-highlights = { path = "crates/rune-highlights" }
rune-image = { path = "crates/rune-image", default-features = false }
rune-kit = { path = "crates/rune-kit", default-features = false }
rune-knobs = { path = "crates/rune-knobs" }
rune-light = { path = "crates/rune-light" }
rune-luau = { path = "crates/rune-luau" }
rune-media = { path = "crates/rune-media", default-features = false }
rune-mermaid = { path = "crates/rune-mermaid" }
rune-motion = { path = "crates/rune-motion" }
rune-notify = { path = "crates/rune-notify" }
rune-ref = { path = "crates/rune-ref" }
rune-spell = { path = "crates/rune-spell" }
rune-staging = { path = "crates/rune-staging" }
rune-taffy = { path = "crates/rune-taffy" }
rune-text = { path = "crates/rune-text", default-features = false }
rune-theme-opencode = { path = "themes/opencode" }
# Shared external crates.
blake3 = "1"
block2 = "0.6"
bytemuck = { version = "1.25", features = ["derive"] }
half = "2"
image = { version = "0.25", default-features = false }
js-sys = "0.3"
libc = "0.2"
miniz_oxide = { version = "0.9", default-features = false, features = ["with-alloc"] }
objc2 = "0.6"
objc2-app-kit = { version = "0.3", default-features = false }
objc2-core-foundation = { version = "0.3", default-features = false }
objc2-core-graphics = { version = "0.3", default-features = false }
objc2-core-video = { version = "0.3", default-features = false }
objc2-foundation = { version = "0.3", default-features = false }
objc2-metal = { version = "0.3", default-features = false }
parley = { version = "0.12", default-features = false }
parley_engine = { version = "0.12", default-features = false }
png = "0.18"
pollster = "1"
resvg = { version = "0.45", default-features = false }
rustc-hash = "2"
serde = "1"
serde_json = "1"
skrifa = "0.44"
swash = "0.2.10"
taffy = { version = "0.15", default-features = false }
tiny-skia = { version = "0.11", default-features = false, features = ["std", "simd"] }
unicode-segmentation = "1.13"
wasm-bindgen = "0.2"
wasm-bindgen-futures = "0.4"
wasmi = { version = "1.1", default-features = false }
web-sys = "0.3"
wgpu = { version = "~30.0.1", default-features = false }
wgpu-naga-bridge = "~30.0.1"
windows = "0.62"
windows-core = "0.62"
windows-sys = "0.61"
winit = { version = "0.30.13", default-features = false }
zeroize = "1.8"
# Full debug info for the workspace crates made a single `rune` test build use 18-23 GB of RAM;
# line tables keep backtraces and file:line in panics at a fraction of that.
[profile.dev]
debug = "line-tables-only"
[profile.dev.package."*"]
debug = false
[profile.release]
codegen-units = 16
incremental = true
# Keep the optional `math` sandbox interpreter compact (saves ~558 KiB in FAT-LTO release builds
# with zero effect on the UI thread since math typesets on a background worker and caches results).
[profile.release.package.wasmi]
opt-level = "z"
[profile.release.package.wasmi_core]
opt-level = "z"
[profile.release.package.wasmi_ir]
opt-level = "z"
[profile.release.package.wasmi_collections]
opt-level = "z"
[profile.release.package.wasmparser]
opt-level = "z"
# Benchmarks and perf numbers. Same codegen as release, without incremental, which can move
# frame timings. The runtime bench scripts refuse binaries built with any other profile.
[profile.perf]
inherits = "release"
opt-level = 3
codegen-units = 16
lto = false
debug = false
incremental = false
# `cargo bench` inherits release; scripts/check-reference-instructions.sh compares its instruction
# counts across revisions.
[profile.bench]
incremental = false
[profile.rune-hot]
inherits = "dev"
debug = 0
incremental = true
[profile.rune-hot.package.png]
opt-level = 3
[profile.rune-hot.package.fdeflate]
opt-level = 3
[workspace.lints.rust]
# shared-lints begin
unsafe_op_in_unsafe_fn = "deny"
unused_must_use = "deny"
# shared-lints end
unsafe_code = "deny" # pure-Rust crates use #![forbid(unsafe_code)]; FFI/SIMD leaf modules opt in locally
[workspace.lints.clippy]
# shared-lints begin
await_holding_lock = "deny"
await_holding_refcell_ref = "deny"
dbg_macro = "deny"
disallowed_methods = "deny"
disallowed_types = "deny"
expect_used = "warn"
let_underscore_must_use = "deny"
todo = "warn"
undocumented_unsafe_blocks = "deny"
unwrap_used = "warn"
# shared-lints end