Skip to content

Separate the web runner from eframe and update egui#170

Merged
melody-rs merged 18 commits intoAstrabit-ST:devfrom
white-axe:web-runner
Jul 27, 2025
Merged

Separate the web runner from eframe and update egui#170
melody-rs merged 18 commits intoAstrabit-ST:devfrom
white-axe:web-runner

Conversation

@white-axe
Copy link
Collaborator

@white-axe white-axe commented Jul 24, 2025

Description

This pull request moves the custom web runner used by Luminol back into a self-contained set of files like it was before #70 to make it easier to update egui, removes the custom eframe and egui-wgpu crates and updates egui to 0.32.0 and wgpu to 25.0.2.

Testing

All the functionality that was previously managed by the web runner should still work:

  • Mouse buttons and mouse movement
  • Key presses on the keyboard, including modifier keys like control or shift
  • Typing text into text boxes using the keyboard
  • Typing text into text boxes using an input method editor
  • The screen reader (this isn't enabled by default, but can be enabled by setting ctx.options_mut(|o| o.screen_reader = true) anywhere and then focusing buttons or labels in the user interface)
  • Resizing the browser window
  • Zooming the browser window
  • Copying and pasting text
  • Clicking on links, like the one in the preset visuals section of the preferences window that links to the Luminol GitHub page

Checklist

  • Run cargo fmt.
  • Run cargo clippy. If applicable, add:
    • --target wasm32-unknown-unknown -Z build-std=std,panic_abort
  • Run cargo build --release
  • If applicable, run trunk build --release

This allows for removing the forked versions of eframe and egui-wgpu.
(See white-axe/mkxp-z-libretro-emscripten@2c92d6e)

In Firefox, service workers have an idle timeout of 30 seconds by
default. If they spend more than 30 seconds idle (e.g. fetching files
from the Internet) without receiving any messages from the main thread,
Firefox will kill them. This is a workaround for that for users with
slow connections.
@white-axe white-axe added dependencies Pull requests that update a dependency file code style webassembly labels Jul 24, 2025
@white-axe
Copy link
Collaborator Author

I've added egui-modal as a vendored crate so that egui can be updated past 0.30.0. Since egui starting from version 0.32.0 requires rustc 1.85 or later and some of idna's dependencies now require rustc 1.82 or later, I've updated the nightly toolchain used by the builds to 2025-01-04, the first one from after rustc 1.85. The toolchain also needs to be updated in luminol-website or it'll fail to build.

Copy link
Member

@melody-rs melody-rs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Toasts don't seem to respect egui's scaling anymore?

Image

@white-axe
Copy link
Collaborator Author

It was actually the default font size of the toasts changing. I've changed the font size back to the original one.

@white-axe white-axe requested a review from melody-rs July 26, 2025 16:55
@melody-rs melody-rs merged commit 34724a8 into Astrabit-ST:dev Jul 27, 2025
4 checks passed
@white-axe white-axe deleted the web-runner branch July 27, 2025 01:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

code style dependencies Pull requests that update a dependency file webassembly

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants