Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion crates/rune/src/a11y/roles.rs
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,6 @@ const fn ak_meta(role: Role) -> AkRoleMeta {
Role::Dialog => D.focus("dialog"),
Role::AlertDialog => D.focus("alertdialog"),
Role::Region => D.focus("region"),
Role::Article => D.focus("article"),
Role::Image => D.focus("img"),
_ => D,
}
Expand Down
6 changes: 6 additions & 0 deletions crates/rune/src/overlay/after_hidden.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,10 @@ pub(super) enum Event {
/// A new event-loop turn began (`AnyHost::new_events`).
NewTurn,
/// The in-flight Wayland `wl_display.sync` callback answered (`wl_callback.done`).
#[cfg(any(test, all(unix, not(target_os = "macos"), not(target_os = "ios"), not(target_os = "android"))))]
SyncAnswered,
/// Starting or polling the Wayland `wl_display.sync` failed (fatal display error).
#[cfg(any(test, all(unix, not(target_os = "macos"), not(target_os = "ios"), not(target_os = "android"))))]
SyncFailed,
/// The host reached `about_to_wait` while hidden (`Presence::Hidden`).
AboutToWaitHidden,
Expand Down Expand Up @@ -137,16 +139,20 @@ pub(super) fn step(phase: &mut Phase, event: Event) -> Effects<Effect> {
}
(_, Event::NewTurn) => Effects::none(),

#[cfg(any(test, all(unix, not(target_os = "macos"), not(target_os = "ios"), not(target_os = "android"))))]
(Phase::WaitingSync, Event::SyncAnswered) => {
*phase = Phase::Idle;
Effects::one(Effect::RunCallbacks)
}
#[cfg(any(test, all(unix, not(target_os = "macos"), not(target_os = "ios"), not(target_os = "android"))))]
(_, Event::SyncAnswered) => Effects::none(),

#[cfg(any(test, all(unix, not(target_os = "macos"), not(target_os = "ios"), not(target_os = "android"))))]
(Phase::WaitingSync, Event::SyncFailed) => {
*phase = Phase::Idle;
Effects::two(Effect::CancelSync, Effect::DropCallbacks)
}
#[cfg(any(test, all(unix, not(target_os = "macos"), not(target_os = "ios"), not(target_os = "android"))))]
(_, Event::SyncFailed) => Effects::none(),

(Phase::ReadyToRun, Event::AboutToWaitHidden) => {
Expand Down
2 changes: 2 additions & 0 deletions crates/rune/src/window/spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1282,7 +1282,9 @@ trait ErasedWindow {

struct Erased<S: 'static> {
spec: WindowSpec<S>,
#[cfg_attr(all(target_arch = "wasm32", not(any(feature = "tooling", debug_assertions))), allow(dead_code))]
handle: Option<crate::WindowHandle>,
#[cfg_attr(all(target_arch = "wasm32", not(any(feature = "tooling", debug_assertions))), allow(dead_code))]
secondary: bool,
}

Expand Down
23 changes: 18 additions & 5 deletions scripts/web-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ HTML
# and Make-escaped spaces); Cargo omits non-path (git/registry) crates from dep-info, so fall back to following
# the package's resolved dependencies in cargo metadata when dep-info has no match.
copy_inter_faces() {
local dep=$1 dest=$2 cut= dir= has_dep=0 full_meta= face=
local dep=$1 dest=$2 cut= dir= has_dep=0 need_meta=1 full_meta= face=
local faces=(Inter-Regular.ttf Inter-Medium.ttf Inter-SemiBold.ttf)
if [[ -f $dep ]]; then
has_dep=1
Expand All @@ -166,10 +166,23 @@ copy_inter_faces() {
dir=${cut%/first/Inter-Regular.ttf}
fi
fi
if [[ -z $dir ]]; then
if ! full_meta=$("$cargo" metadata --format-version 1 --offline --filter-platform wasm32-unknown-unknown); then
echo "failed to locate Rune Inter faces: cargo metadata failed" >&2
return 1
if [[ -z $dir && $has_dep == 1 && -f "${root:-}/Cargo.lock" ]]; then
# Dep-info already covers every path dependency. Only fall back to `cargo metadata` when
# the lockfile contains a non-path (git/registry) `rune` crate; otherwise `cargo metadata`
# tries to resolve unrelated workspace members whose crates were never fetched.
need_meta=$(python3 -c '
import sys, tomllib
pkgs = tomllib.load(open(sys.argv[1], "rb")).get("package", [])
print("1" if any(p.get("name") == "rune" and p.get("source") for p in pkgs) else "0")
' "$root/Cargo.lock") || return 1
need_meta=${need_meta%$'\r'}
fi
if [[ -z $dir && $need_meta == 1 ]]; then
if ! full_meta=$("$cargo" metadata --format-version 1 --offline --filter-platform wasm32-unknown-unknown 2>/dev/null); then
if ! full_meta=$("$cargo" metadata --format-version 1 --filter-platform wasm32-unknown-unknown); then
echo "failed to locate Rune Inter faces: cargo metadata failed" >&2
return 1
fi
fi
dir=$(python3 -c '
import json, sys
Expand Down
Loading