mirror of
https://github.com/emilk/egui.git
synced 2026-06-26 22:53:14 -04:00
* Closes https://github.com/emilk/egui/issues/1918 * Closes https://github.com/emilk/egui/issues/4437 * Closes https://github.com/emilk/egui/issues/4709 * [x] I have followed the instructions in the PR template Hiya, I need new winit for a specific fix for a android_native_actvity. There are already two PRs, but both don't seem to have a lot of movement, or are entirely complete: https://github.com/emilk/egui/pull/4466 Seems to have gone stale & is missing some bits. https://github.com/emilk/egui/pull/4702 Also seems stale (if less so), and is missing a refactor to run_on_demand. I also *think* the accesskit integration has a mistake and can't be enabled. I've marked them as a co-author on this as I started from this branch. (I think! Haven't done that on git before...). Sorry for the wall of text but just dumping some details / thoughts here: - There's an issue with creating child windows in winit 0.30.1 and up on macOS. The multiple_viewports, "create immediate viewport" example crashes on anything later 0.30.1, with a stack overflow in unsafe code. I've create [a winit issue](https://github.com/rust-windowing/winit/issues/3800), it *might* already be fixed in 0.31.0 but I can't test as 0.31 will likely require another refactoring. For now I have just pinned things to 0.30.0 exatly. - Winit has deprecated run_on_demand, instead requiring the ApplicationHandler interface. In 0.31.0 run_on_demand is removed. I've refactored both the integration and the WinitApp trait to follow this pattern. I've left user_events a bit more opaque, as it seems 0.31.0 is doing a rework of UserEvents too. - I've used the new lazy init approach for access kit from this branch https://github.com/mwcampbell/egui/tree/accesskit-new-lazy-init and marked Matt as co-author, thanks Matt! - There was very similair but not quite the same code for run_and_return and run_and_exit. I've merged them, but looking at the github issues graveyard it seems vey finnicky. I *hope* this is more robust than before but it's a bit scary. - when receiving new_events this also used to check the redraw timing dictionary. That doesn't seem necesarry so left this out, but that is a slight behaviour change? - I have reeneabled serial_windows on macOS. I wondered whether it was fixed after this PR and does seem to be! However, even before this PR it seems to work, so maybe winit has sorted things out before that... Windows also works fine now without the extra hack. - I've done a very basic test of AccessKit on Windows and screen reader seems ok but I'm really not knowleadgable enough to say whether it's all good or not. - I've tested cargo tests & all examples on Windows & macOS, and ran a basic Android app. Still, testing native platforms is wel... hard so if anyone can test linux / iOs / older mac versions / windows 10 would probably be a good idea! - For consistencys sake I've made all event like functions in WinitApp return a `Result<EventResult>`. There's quite a bit of Ok-wrapping now, maybe too annoying? Not sure. Thank you for having a look! # Tested on * [x] macOS * [x] Windows * [x] Wayland (thanks [SiebenCorgie](https://github.com/SiebenCorgie)) * [x] X11 (thanks [crumblingstatue](https://github.com/crumblingstatue)!, [SiebenCorgie](https://github.com/SiebenCorgie)) # TODO * [x] Fix "follow system theme" not working on initial startup (winit issue, pinning to 0.30.2 for now). * [x] Fix `request_repaint_after` --------- Co-authored-by: mwcampbell <mattcampbell@pobox.com> Co-authored-by: j-axa <josef.axa@gmail.com> Co-authored-by: DataTriny <datatriny@gmail.com> Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
110 lines
4.5 KiB
TOML
110 lines
4.5 KiB
TOML
# Copied from https://github.com/rerun-io/rerun_template
|
|
#
|
|
# https://github.com/EmbarkStudios/cargo-deny
|
|
#
|
|
# cargo-deny checks our dependency tree for copy-left licenses,
|
|
# duplicate dependencies, and rustsec advisories (https://rustsec.org/advisories).
|
|
#
|
|
# Install: `cargo install cargo-deny`
|
|
# Check: `cargo deny check`.
|
|
|
|
|
|
# Note: running just `cargo deny check` without a `--target` can result in
|
|
# false positives due to https://github.com/EmbarkStudios/cargo-deny/issues/324
|
|
[graph]
|
|
targets = [
|
|
{ triple = "aarch64-apple-darwin" },
|
|
{ triple = "i686-pc-windows-gnu" },
|
|
{ triple = "i686-pc-windows-msvc" },
|
|
{ triple = "i686-unknown-linux-gnu" },
|
|
{ triple = "wasm32-unknown-unknown" },
|
|
{ triple = "x86_64-apple-darwin" },
|
|
{ triple = "x86_64-pc-windows-gnu" },
|
|
{ triple = "x86_64-pc-windows-msvc" },
|
|
{ triple = "x86_64-unknown-linux-gnu" },
|
|
{ triple = "x86_64-unknown-linux-musl" },
|
|
{ triple = "x86_64-unknown-redox" },
|
|
]
|
|
all-features = true
|
|
|
|
|
|
[advisories]
|
|
version = 2
|
|
ignore = [
|
|
"RUSTSEC-2024-0320", # unmaintaines yaml-rust pulled in by syntect
|
|
{ name = "async-process" }, # yanked crated pulled in by old accesskit
|
|
]
|
|
|
|
|
|
[bans]
|
|
multiple-versions = "deny"
|
|
wildcards = "deny"
|
|
deny = [
|
|
{ name = "cmake", reason = "It has hurt me too much" },
|
|
{ name = "openssl-sys", reason = "Use rustls" },
|
|
{ name = "openssl", reason = "Use rustls" },
|
|
]
|
|
|
|
skip = [
|
|
{ name = "bit-set" }, # wgpu's naga depends on 0.6, syntect's (used by egui_extras) fancy-regex depends on 0.5
|
|
{ name = "bit-vec" }, # dependency of bit-set in turn, different between 0.6 and 0.5
|
|
{ name = "bitflags" }, # old 1.0 version via glutin, png, spirv, …
|
|
{ name = "cfg_aliases" }, # old version via wgpu
|
|
{ name = "event-listener" }, # TODO(emilk): rustls pulls in two versions of this 😭
|
|
{ name = "futures-lite" }, # old version via accesskit_unix and zbus
|
|
{ name = "memoffset" }, # tiny dependency
|
|
{ name = "ndk-sys" }, # old version via wgpu, winit uses newer version
|
|
{ name = "quick-xml" }, # old version via wayland-scanner
|
|
{ name = "redox_syscall" }, # old version via winit
|
|
{ name = "time" }, # old version pulled in by unmaintianed crate 'chrono'
|
|
{ name = "windows-core" }, # old version via accesskit_windows
|
|
{ name = "windows" }, # old version via accesskit_windows
|
|
]
|
|
skip-tree = [
|
|
{ name = "criterion" }, # dev-dependency
|
|
{ name = "fastrand" }, # old version via accesskit_unix
|
|
{ name = "foreign-types" }, # small crate. Old version via core-graphics (winit).
|
|
{ name = "objc2" }, # old version via accesskit_macos
|
|
{ name = "polling" }, # old version via accesskit_unix
|
|
{ name = "rfd" }, # example dependency
|
|
]
|
|
|
|
|
|
[licenses]
|
|
version = 2
|
|
private = { ignore = true }
|
|
confidence-threshold = 0.93 # We want really high confidence when inferring licenses from text
|
|
allow = [
|
|
"Apache-2.0 WITH LLVM-exception", # https://spdx.org/licenses/LLVM-exception.html
|
|
"Apache-2.0", # https://tldrlegal.com/license/apache-license-2.0-(apache-2.0)
|
|
"BSD-2-Clause", # https://tldrlegal.com/license/bsd-2-clause-license-(freebsd)
|
|
"BSD-3-Clause", # https://tldrlegal.com/license/bsd-3-clause-license-(revised)
|
|
"BSL-1.0", # https://tldrlegal.com/license/boost-software-license-1.0-explained
|
|
"CC0-1.0", # https://creativecommons.org/publicdomain/zero/1.0/
|
|
"ISC", # https://www.tldrlegal.com/license/isc-license
|
|
"LicenseRef-UFL-1.0", # no official SPDX, see https://github.com/emilk/egui/issues/2321
|
|
"MIT-0", # https://choosealicense.com/licenses/mit-0/
|
|
"MIT", # https://tldrlegal.com/license/mit-license
|
|
"MPL-2.0", # https://www.mozilla.org/en-US/MPL/2.0/FAQ/ - see Q11. Used by webpki-roots on Linux.
|
|
"OFL-1.1", # https://spdx.org/licenses/OFL-1.1.html
|
|
"OpenSSL", # https://www.openssl.org/source/license.html - used on Linux
|
|
"Unicode-DFS-2016", # https://spdx.org/licenses/Unicode-DFS-2016.html
|
|
"Zlib", # https://tldrlegal.com/license/zlib-libpng-license-(zlib)
|
|
]
|
|
exceptions = []
|
|
|
|
[[licenses.clarify]]
|
|
name = "webpki"
|
|
expression = "ISC"
|
|
license-files = [{ path = "LICENSE", hash = 0x001c7e6c }]
|
|
|
|
[[licenses.clarify]]
|
|
name = "ring"
|
|
expression = "MIT AND ISC AND OpenSSL"
|
|
license-files = [{ path = "LICENSE", hash = 0xbd0eed23 }]
|
|
|
|
|
|
[sources]
|
|
unknown-registry = "deny"
|
|
unknown-git = "deny"
|