Commit Graph

100 Commits

Author SHA1 Message Date
Emil Ernerfeldt a9a6e0c2f2
Remove the need for setting `web_sys_unstable_apis` (#5000)
* No longer required since https://github.com/emilk/egui/pull/4980

And despite some outdated comments, wgpu/WebGPU doesn't need it either
2024-08-26 16:31:38 +02:00
Arthur Brussee 6f2f006885
Upgrade winit to 0.30.2 (#4849)
* 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>
2024-07-31 09:43:16 +02:00
Salman Abuhaimed 34db001db1
Force canvas/text input focus on touch for iOS web browsers (#4848) 2024-07-23 18:16:51 +02:00
Emil Ernerfeldt 254dfc1ebc
Fix broken mouse coordinates when there's padding on the canvas element (#4729)
* Closes https://github.com/emilk/egui/issues/4725

Also fixes touch input being wrong if the web page is scrolled.
2024-06-28 13:02:36 +02:00
crumblingstatue 49cb62b1ba
Replace `directories-next` dependency with `directories` (#4661)
`directories-next` was created because `directories` was not maintained
at the time. However, `directories` has gotten active maintainership
since, and it has received more updates than `directories-next`.

`directories` also has more recent downloads than its `next`
counterpart, so it might make sense to switch to it, to avoid
unnecessary duplicate dependencies, where a project depends transitively
on both `directories` and `directories-next`.

The main question is whether we depend on any specific behavior from
`directories-next`.
2024-06-18 22:17:21 +02:00
Jan Procházka 759c8fd2c9
Use ResizeObserver instead of `resize` event (#4536)
Currently, if the size of the canvas element changes independently of
the size of the browser window (e.g. due to its parent element
shrinking), then no repaints are scheduled.

This PR replaces the `resize` event with a `ResizeObserver`, which
ensures that _any_ resize of the canvas element (including those caused
by browser window resizes) trigger a repaint. The repaint is done
synchronously as part of the resize event, to reduce any potential
flickering.

The result seems to pass the rendering tests on most platform+browser
combinations. We tested:
- Chrome, Firefox, Safari on macOS
- Chrome, Firefox on Linux (ubuntu and arch, both running wayland)
- Chrome, Firefox on Windows

Firefox still has some antialiasing issues on Linux platforms, but this
antialiasing also happens on `master`, so this PR is not a regression
there.

The code setting `canvas.style.width` and `canvas.style.height` at the
start of `AppRunner::logic` was also removed - the canvas _display_ size
is now fully controlled by CSS, e.g. by setting `canvas { width: 100%;
height: 100%; }`.

The approach used here is described in
https://webglfundamentals.org/webgl/lessons/webgl-resizing-the-canvas.html

Note: The only remaining place where egui updates the style of the
canvas it is rendering to is some of the IME/mobile input handling code.
Fixing that is out of scope for this PR, and will be done in a followup
PR.
2024-05-27 21:41:28 +02:00
Oscar Gustafsson cd45d18615
Do no use the ahash reimport (#4504)
<!--
Please read the "Making a PR" section of
[`CONTRIBUTING.md`](https://github.com/emilk/egui/blob/master/CONTRIBUTING.md)
before opening a Pull Request!

* Keep your PR:s small and focused.
* The PR title is what ends up in the changelog, so make it descriptive!
* If applicable, add a screenshot or gif.
* If it is a non-trivial addition, consider adding a demo for it to
`egui_demo_lib`, or a new example.
* Do NOT open PR:s from your `master` branch, as that makes it hard for
maintainers to add commits to your PR.
* Remember to run `cargo fmt` and `cargo clippy`.
* Open the PR as a draft until you have self-reviewed it and run
`./scripts/check.sh`.
* When you have addressed a PR comment, mark it as resolved.

Please be patient! I will review your PR, but my time is limited!
-->

Related to #3482 

Not sure what the "best practice" is, to me it seems like one should
import from "the original location" if possible, but now it should at
least be possible to not re-export ahash without any breakage in the
egui code base (but possibly in projects using egui, so one should
probably deprecate it if one would like to go that path). It also seems
like epaint re-exports ahash.
2024-05-27 16:24:50 +02:00
Oscar Gustafsson c1eb3f884d
Move dependencies to workspace (#4495)
<!--
Please read the "Making a PR" section of
[`CONTRIBUTING.md`](https://github.com/emilk/egui/blob/master/CONTRIBUTING.md)
before opening a Pull Request!

* Keep your PR:s small and focused.
* The PR title is what ends up in the changelog, so make it descriptive!
* If applicable, add a screenshot or gif.
* If it is a non-trivial addition, consider adding a demo for it to
`egui_demo_lib`, or a new example.
* Do NOT open PR:s from your `master` branch, as that makes it hard for
maintainers to add commits to your PR.
* Remember to run `cargo fmt` and `cargo clippy`.
* Open the PR as a draft until you have self-reviewed it and run
`./scripts/check.sh`.
* When you have addressed a PR comment, mark it as resolved.

Please be patient! I will review your PR, but my time is limited!
-->

Inspired by:

44d65f41ac/Cargo.toml (L65)

I took the liberty of removing that comment since I *think* that I got
all "relevant" ones (showing up more than once, sort of).
2024-05-14 11:02:49 +02:00
Emil Ernerfeldt 44d65f41ac
Update `image` crate to 0.25 (#4160)
To not produce duplicating deps in Rerun
(https://github.com/rerun-io/rerun/pull/5280) I suggest we wait with
merging this until these crates have updated to `image` 0.25:
* [x] [`arboard`](https://crates.io/crates/arboard)
* [x] [`gltf`](https://crates.io/crates/gltf)
2024-05-13 13:35:15 +02:00
Emil Ernerfeldt 059218d954
eframe: Remove dependency on `thiserror` (#4483)
Less dependencies => faster compile times

* Part of https://github.com/emilk/egui/issues/4481
2024-05-11 20:17:06 +02:00
Emil Ernerfeldt 2f508d6a61
Replace cargo-cranky with workspace lints (#4413)
Replace `cargo-cranky` (which has served us well) with workspace lints
2024-04-25 17:24:50 +02:00
Mads Marquart 14194f5d3a
eframe: Use `objc2` and its framework crates (#4395)
These are a replacement to the `objc` and `cocoa` crates.

This PR prevents:
- An extra copy when creating `NSData`
- A memory leak when creating `NSImage`
- A memory leak when creating `NSString`

And is generally a readability improvement.

Note that we define `NSApp` manually for now, the implementation in
`objc2-app-kit` is currently suboptimal and wouldn't allow you to check
whether the NSApplication has been created or not.

Related: https://github.com/emilk/egui/issues/4219, this should nicely
coincide with the Winit `0.30` release.

---------

Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
2024-04-23 17:35:12 +02:00
Cameron Taggart ca1f453c47
add webgpu feature by default for wgpu feature of eframe (#4124)
Fix #4123. Looks like it was caused by #3875.
2024-03-04 20:20:03 +01:00
Varphone Wong 1970e2ccb1
`eframe`: Add `winuser` feature to `winapi` to fix unresolved import (#4037)
After merging PR #4036, build errors occurred in eframe-related
applications:

```log
error[E0432]: unresolved import `winapi::um::winuser`
   --> crates\eframe\src\native\app_icon.rs:83:9
    |
83  |     use winapi::um::winuser;
    |         ^^^^^^^^^^^^^^^^^^^ no `winuser` in `um`
    |
note: found an item that was configured out
   --> C:\Users\Varphone\.cargo\registry\src\index.crates.io-6f17d22bba15001f\winapi-0.3.9\src\um\mod.rs:290:37
    |
290 | #[cfg(feature = "winuser")] pub mod winuser;
    |                                     ^^^^^^^
    = note: the item is gated behind the `winuser` feature

For more information about this error, try `rustc --explain E0432`.
error: could not compile `eframe` (lib) due to previous error
warning: build failed, waiting for other jobs to finish...
```
2024-02-13 12:27:58 +01:00
Emil Ernerfeldt d02491425c
Put all egui crates as workspace crates (#3976)
Second attempty
2024-02-05 12:59:49 +01:00
Emil Ernerfeldt bcebfecb84
Use more workspace dependencies (#3975) 2024-02-05 12:43:58 +01:00
Emil Ernerfeldt 8f2c8664e7
Emilk/revert workspace deps (#3942)
* Closes https://github.com/emilk/egui/issues/3941

Workspace dependencies can be annoying.

If you don't set them to `default-features=false`, then you cannot opt
out of their default features anywhere else, and get warnings if you
try.

So you set `default-features=false`, and then you need to manually opt
in to the default features everywhere else.
Or, as in my case, don't.

I don't have the energy to do this tonight, so I'll just revert.
2024-02-01 21:29:48 +01:00
Emil Ernerfeldt 00cd671ad8 Use workspace dependencies for the egui crates 2024-02-01 20:25:31 +01:00
Emil Ernerfeldt dda9f79838 Remove `version` field for path-dependencies 2024-02-01 20:11:40 +01:00
YgorSouza d72f92c41d
Add `x11` and `wayland` features to egui-wgpu and egui_glow (#3909)
This allows them to build correctly on Linux by passing one or both of
the features alongside `winit`.

Closes #3492
Closes #2286
2024-01-30 16:55:55 +01:00
Emil Ernerfeldt ab39420c29
Much more accurate `cpu_usage` timing (#3913)
`frame.info.cpu_usage` now includes time for tessellation and rendering,
but excludes vsync and context switching.
2024-01-29 19:12:16 +01:00
Emil Ernerfeldt 3a8e2348a5
`egui-wgpu`: turn off the default features of `wgpu` (#3875)
This makes all `wgpu` features opt-in for `egui-wgpu` users.

For `eframe`, I opted to enable some `wgpu` features so users can still
use `eframe` without having to also opt-in to extra ewgpu features
(eframe is batteries-included).
2024-01-24 09:43:40 +01:00
Emil Ernerfeldt b766a48fa7
Update wgpu to 0.19 (#3824)
* Closes https://github.com/emilk/egui/issues/3675

---------

Co-authored-by: Andreas Reich <r_andreas2@web.de>
Co-authored-by: Mingun <Alexander_Sergey@mail.ru>
2024-01-19 10:14:13 +01:00
Emil Ernerfeldt 12ad9e7b36 Release 0.25.0 - Better keyboard input 2024-01-08 12:25:43 +01:00
Emil Ernerfeldt 12468438a3
`eframe`: Fix building the `wasm32` docs for `docs.rs` (#3757)
* Closes https://github.com/emilk/egui/issues/3756

Fix suggested by @morionelab
2023-12-31 10:26:02 +01:00
Emil Ernerfeldt 449678e617
Update to glow 0.13 (#3715) 2023-12-18 15:15:20 +01:00
Fredrik Fornwall 8e5959d55d
Update to winit 0.29 (#3649)
* Closes https://github.com/emilk/egui/issues/3542
* Closes https://github.com/emilk/egui/issues/2977
* Closes https://github.com/emilk/egui/issues/3303

---------

Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
2023-12-18 14:53:14 +01:00
Emil Ernerfeldt d17613c242 Release 0.24.1 - Bug fixes 2023-11-30 17:46:25 +01:00
Emil Ernerfeldt a1f3c71b7f
Remove dependency on `tts` (#3651)
We were using [`tts`](https://github.com/ndarilek/tts-rs) for the
web-only screen reader. This was overkill, to say the least. It is now
replaced with ten lines of `web-sys` calls.
2023-11-28 10:46:18 +01:00
Emil Ernerfeldt bd087ffb8d Release 0.24.0 - Multi-viewport 2023-11-23 15:56:46 +01:00
Emil Ernerfeldt 96bc34a66d Use workspace definitions of edition,license,rust-version,version 2023-11-23 15:45:11 +01:00
Emil Ernerfeldt 1bbd5a9fc8
Update puffin to 0.18 (#3600)
THe profiling macros now contain unsafe code (but in a safe way), so
`#[foribd(unsafe)]` had to become `#[deny(unsafe)]`
2023-11-21 17:58:33 +01:00
Emil Ernerfeldt bfadb90d42
Update MSRV to Rust 1.72 (#3595)
Required to update to puffin 0.18
2023-11-21 17:26:35 +01:00
Emil Ernerfeldt e823491240
Update some crate dependencies (#3594)
Nothing major
2023-11-21 16:07:56 +01:00
Emil Ernerfeldt 7bfaf49636
Update to puffin 0.17 (#3581) 2023-11-19 21:28:42 +01:00
Emil Ernerfeldt 30ee478caf
Fix egui-wgpu performance regression (#3580)
Introduced in the recent multi-viewports work, we accidentally recreated
the wgpu surfaces every frame. This is now fixed.

I found this while improving the profiling of `eframe`
2023-11-19 21:14:13 +01:00
Emil Ernerfeldt 5a0186fa2b Release 0.23.0 - New image API 2023-09-28 08:44:33 +02:00
Emil Ernerfeldt a9272e0e55
Update dependencies in Cargo.lock (#3401)
* Update to ehttp 0.3.1 with better error messages

* Explain why we are using an old cocoa

* cargo update

❯ cargo update
    Updating crates.io index
    Updating accesskit v0.11.0 -> v0.11.2
    Updating accesskit_consumer v0.15.0 -> v0.15.2
    Updating accesskit_macos v0.7.0 -> v0.9.0
    Updating accesskit_unix v0.5.0 -> v0.5.2
    Updating accesskit_windows v0.14.0 -> v0.14.3
    Updating accesskit_winit v0.14.0 -> v0.14.4
    Updating addr2line v0.19.0 -> v0.21.0
    Removing ahash v0.7.6
    Updating aho-corasick v1.0.1 -> v1.1.1
      Adding allocator-api2 v0.2.16
    Updating android-activity v0.4.1 -> v0.4.3
      Adding android-tzdata v0.1.1
    Updating anyhow v1.0.71 -> v1.0.75
    Updating arboard v3.2.0 -> v3.2.1
    Updating arrayvec v0.7.2 -> v0.7.4
    Updating async-channel v1.8.0 -> v1.9.0
    Updating async-executor v1.5.1 -> v1.5.3
      Adding async-fs v1.6.0
    Updating async-lock v2.7.0 -> v2.8.0
      Adding async-process v1.8.0
    Updating async-recursion v1.0.4 -> v1.0.5
      Adding async-signal v0.2.1
    Updating async-task v4.4.0 -> v4.4.1
    Updating async-trait v0.1.68 -> v0.1.73
      Adding atomic-waker v1.1.2
    Updating backtrace v0.3.67 -> v0.3.69
      Adding base64 v0.21.4
    Updating bindgen v0.65.1 -> v0.68.1
    Updating bitflags v2.3.1 -> v2.4.0
      Adding blocking v1.4.0
    Updating bumpalo v3.13.0 -> v3.14.0
    Updating bytemuck v1.13.1 -> v1.14.0
    Updating bytemuck_derive v1.4.1 -> v1.5.0
    Updating bytes v1.4.0 -> v1.5.0
    Updating calloop v0.10.5 -> v0.10.6
    Updating cc v1.0.79 -> v1.0.83
    Updating cfg-expr v0.15.1 -> v0.15.5
    Updating chrono v0.4.24 -> v0.4.31
    Updating cocoa-foundation v0.1.1 -> v0.1.2
    Updating concurrent-queue v2.2.0 -> v2.3.0
    Updating core-graphics-types v0.1.1 -> v0.1.2
    Updating cpufeatures v0.2.7 -> v0.2.9
    Updating crossbeam-utils v0.8.15 -> v0.8.16
      Adding deranged v0.3.8
    Removing dirs v4.0.0
    Removing dirs-sys v0.3.7
    Updating dlib v0.5.0 -> v0.5.2
    Updating dyn-clone v1.0.11 -> v1.0.14
    Updating either v1.8.1 -> v1.9.0
    Updating enum-map v2.5.0 -> v2.6.3
    Updating enum-map-derive v0.11.0 -> v0.14.0
    Updating enumflags2 v0.7.7 -> v0.7.8
    Updating enumflags2_derive v0.7.7 -> v0.7.8
    Updating enumn v0.1.8 -> v0.1.12
      Adding equivalent v1.0.1
    Updating errno v0.3.1 -> v0.3.3
      Adding event-listener v3.0.0
    Updating fancy-regex v0.7.1 -> v0.11.0
      Adding fastrand v2.0.1
      Adding fdeflate v0.3.0
    Updating flate2 v1.0.25 -> v1.0.27
    Updating form_urlencoded v1.1.0 -> v1.2.0
    Updating getrandom v0.2.9 -> v0.2.10
    Updating gimli v0.27.2 -> v0.28.0
    Updating glutin v0.30.8 -> v0.30.10
    Updating glutin_egl_sys v0.5.0 -> v0.5.1
    Updating gpu-descriptor v0.2.3 -> v0.2.4
    Updating gpu-descriptor-types v0.1.1 -> v0.1.2
      Adding hashbrown v0.14.0
    Updating hermit-abi v0.3.1 -> v0.3.3
    Updating iana-time-zone v0.1.56 -> v0.1.57
    Updating idna v0.3.0 -> v0.4.0
    Updating image v0.24.6 -> v0.24.7
      Adding indexmap v2.0.0
    Updating io-lifetimes v1.0.10 -> v1.0.11
    Updating is-terminal v0.4.7 -> v0.4.9
    Updating itoa v1.0.6 -> v1.0.9
    Updating libc v0.2.144 -> v0.2.148
      Adding linux-raw-sys v0.4.7
    Updating lock_api v0.4.9 -> v0.4.10
    Updating log v0.4.17 -> v0.4.20
    Updating memchr v2.5.0 -> v2.6.3
      Adding memoffset v0.7.1
    Updating miniz_oxide v0.6.2 -> v0.7.1
    Updating mio v0.8.6 -> v0.8.8
      Adding nix v0.26.4
    Updating num-traits v0.2.15 -> v0.2.16
      Adding num_enum v0.6.1
      Adding num_enum_derive v0.6.1
    Updating object v0.30.3 -> v0.32.1
    Updating once_cell v1.17.1 -> v1.18.0
    Updating orbclient v0.3.45 -> v0.3.46
    Updating os_str_bytes v6.5.0 -> v6.5.1
    Updating parking v2.1.0 -> v2.1.1
    Updating parking_lot_core v0.9.7 -> v0.9.8
    Updating paste v1.0.12 -> v1.0.14
    Updating percent-encoding v2.2.0 -> v2.3.0
    Updating pin-project-lite v0.2.9 -> v0.2.13
      Adding piper v0.2.1
    Updating plist v1.4.0 -> v1.5.0
    Updating png v0.17.7 -> v0.17.10
    Updating prettyplease v0.2.5 -> v0.2.15
    Updating proc-macro2 v1.0.58 -> v1.0.67
    Updating profiling v1.0.8 -> v1.0.11
    Updating quick-xml v0.26.0 -> v0.29.0
    Updating quote v1.0.27 -> v1.0.33
    Updating regex v1.8.2 -> v1.9.5
      Adding regex-automata v0.3.8
    Removing regex-syntax v0.6.29
    Removing regex-syntax v0.7.2
      Adding regex-syntax v0.7.5
    Updating ron v0.8.0 -> v0.8.1
    Removing rustix v0.37.19
      Adding rustix v0.37.23
      Adding rustix v0.38.14
    Updating rustls v0.20.8 -> v0.21.7
      Adding rustls-webpki v0.100.3
      Adding rustls-webpki v0.101.6
    Updating ryu v1.0.13 -> v1.0.15
    Updating scopeguard v1.1.0 -> v1.2.0
    Updating serde v1.0.163 -> v1.0.188
    Updating serde_derive v1.0.163 -> v1.0.188
    Updating serde_json v1.0.96 -> v1.0.107
    Updating serde_repr v0.1.12 -> v0.1.16
    Updating serde_spanned v0.6.2 -> v0.6.3
    Updating sha1 v0.10.5 -> v0.10.6
    Updating shlex v1.1.0 -> v1.2.0
      Adding signal-hook-registry v1.4.1
      Adding simd-adler32 v0.3.7
    Updating siphasher v0.3.10 -> v0.3.11
    Updating slab v0.4.8 -> v0.4.9
    Updating smallvec v1.10.0 -> v1.11.1
    Updating smithay-client-toolkit v0.16.0 -> v0.16.1
    Updating strict-num v0.1.0 -> v0.1.1
    Updating syn v2.0.16 -> v2.0.37
    Updating syntect v5.0.0 -> v5.1.0
    Updating system-deps v6.1.0 -> v6.1.1
    Updating target-lexicon v0.12.7 -> v0.12.11
    Updating tempfile v3.5.0 -> v3.8.0
    Updating termcolor v1.2.0 -> v1.3.0
    Updating thiserror v1.0.40 -> v1.0.49
    Updating thiserror-impl v1.0.40 -> v1.0.49
    Removing time v0.1.45
    Removing time v0.3.21
      Adding time v0.3.29
    Updating time-core v0.1.1 -> v0.1.2
    Updating time-macros v0.2.9 -> v0.2.15
    Updating toml v0.7.4 -> v0.7.8
    Updating toml_datetime v0.6.2 -> v0.6.3
    Updating toml_edit v0.19.9 -> v0.19.15
    Updating tracing-attributes v0.1.24 -> v0.1.26
    Updating ttf-parser v0.19.0 -> v0.19.2
    Updating tts v0.25.5 -> v0.25.6
    Updating typenum v1.16.0 -> v1.17.0
    Updating unicode-ident v1.0.8 -> v1.0.12
    Updating unicode-width v0.1.10 -> v0.1.11
    Updating ureq v2.6.2 -> v2.7.1
    Updating url v2.3.1 -> v2.4.1
    Updating waker-fn v1.1.0 -> v1.1.1
    Updating walkdir v2.3.3 -> v2.4.0
    Removing wasi v0.10.0+wasi-snapshot-preview1
    Updating wasm-bindgen-futures v0.4.36 -> v0.4.37
    Updating webbrowser v0.8.10 -> v0.8.11
    Removing webpki v0.22.1
    Updating webpki-roots v0.22.6 -> v0.23.1
    Updating which v4.4.0 -> v4.4.2
    Updating winapi-util v0.1.5 -> v0.1.6
      Adding windows v0.51.1
      Adding windows-core v0.51.1
    Updating windows-implement v0.44.0 -> v0.48.0
    Updating windows-interface v0.44.0 -> v0.48.0
    Updating windows-targets v0.48.0 -> v0.48.5
    Updating windows_aarch64_gnullvm v0.48.0 -> v0.48.5
    Updating windows_aarch64_msvc v0.48.0 -> v0.48.5
    Updating windows_i686_gnu v0.48.0 -> v0.48.5
    Updating windows_i686_msvc v0.48.0 -> v0.48.5
    Updating windows_x86_64_gnu v0.48.0 -> v0.48.5
    Updating windows_x86_64_gnullvm v0.48.0 -> v0.48.5
    Updating windows_x86_64_msvc v0.48.0 -> v0.48.5
    Updating winnow v0.4.6 -> v0.5.15
      Adding xdg-home v1.0.0
    Updating xml-rs v0.8.15 -> v0.8.19
    Updating zbus v3.10.0 -> v3.14.1
    Updating zbus_macros v3.10.0 -> v3.14.1
    Updating zbus_names v2.5.1 -> v2.6.0
    Updating zvariant v3.14.0 -> v3.15.0
    Updating zvariant_derive v3.14.0 -> v3.15.0

❯ cargo update -p ureq --precise 2.6.2
    Updating crates.io index
 Downgrading rustls v0.21.7 -> v0.20.9
    Removing rustls-webpki v0.100.3
    Removing rustls-webpki v0.101.6
 Downgrading ureq v2.7.1 -> v2.6.2
      Adding webpki v0.22.1
 Downgrading webpki-roots v0.23.1 -> v0.22.6

❯ cargo update -p plist --precise 1.4.0
    Updating crates.io index
 Downgrading plist v1.5.0 -> v1.4.0
 Downgrading quick-xml v0.29.0 -> v0.26.0

❯ cargo update -p ron --precise 0.8.0
    Updating crates.io index
    Removing base64 v0.21.4
 Downgrading ron v0.8.1 -> v0.8.0

* Remove unnecessary mut

* Silence over-eager clippy

* Add misisng `'static` lifetime to `run_simple_native`

* ❯ cargo update -p android-activity --precise 0.4.1

    Updating crates.io index
 Downgrading android-activity v0.4.2 -> v0.4.1
    Removing num_enum v0.6.1
    Removing num_enum_derive v0.6.1
2023-09-27 12:49:24 +02:00
Emil Ernerfeldt f138131bc8 Improve top-level crate docs, and sort features is Cargo.toml 2023-09-27 11:40:28 +02:00
Emil Ernerfeldt 82704bebbf
Update MSRV to Rust 1.70.0 (#3310)
* Update to Rust 1.70

* Fix renamed clippy lint

* Use let-else more

* Code cleanup

* Remove derelict Safety comments

* Enable more clippy lints
2023-09-06 07:59:24 +02:00
Emil Ernerfeldt 67168be069
Improve clippy, and add more docs (#3306)
* Silence a few clippy warnings

* Use named threads

* Remove some deprecated functions

* Document Context and Ui fully

* Use `parking_lot::Mutex` in `eframe`

* Expand clippy.toml files

* build fix
2023-09-05 14:11:22 +02:00
Emil Ernerfeldt 9e86bb8d6a
Add opt-in `puffin` feature to egui (#3298)
* Add opt-in `puffin` feature to egui

* fix web build

* Fix web for realz
2023-09-04 15:01:22 +02:00
Aaron Hill 98087029e0
Update to `wgpu` 0.17.0 (#3170)
* Bump `wgpu` to 0.17.0
This required bumping wasm-bindgen to 0.2.87
* cargo deny exception for `foreign-types`
* sort deny.toml
* Add fragile-send-sync-non-atomic-wasm feature to wgpu
* cargo deny: ignore children of foreign-types

---------

Co-authored-by: Andreas Reich <r_andreas2@web.de>
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
2023-08-11 17:10:10 +02:00
Emil Ernerfeldt f78db80840
Update to wasm-bindgen 0.2.87 (#3237)
* Update to wasm-bindgen 0.2.87

Required by the new `wgpu` version

* Catch unknown arguments to build_demo_web.sh
2023-08-11 15:34:16 +02:00
Emil Ernerfeldt 08fb447fb5
Increase MSRV to 1.67 (#3234)
* Bump MSRV to 1.67

* clippy fixes

* cargo clippy: inline format args

* Add `clippy::uninlined_format_args` to cranky lints

* Fix clippy on wasm

* More clippy fixes
2023-08-11 13:54:02 +02:00
Emil Ernerfeldt 7e035c6dd1
Allow users to opt-out of default `winit` features (#3228)
* Do not enable winit features by default

* Enable default winit features by default

* Add x11 feature
2023-08-10 17:09:01 +02:00
Emil Ernerfeldt 083d61fccd
Update to puffin 0.16 (#3144) 2023-07-10 12:29:01 +02:00
τ 073f49682d
Expose Raw Window and Display Handles (#3073)
* Expose raw window and display handles in eframe

* Ensure that no one implements `Clone` in the future

* Cleanup

---------

Co-authored-by: Matti Virkkunen <mvirkkunen@gmail.com>
2023-06-11 22:18:28 +02:00
Emil Ernerfeldt 307565efa5 Release 0.22.0 - A plethora of small improvements 2023-05-23 19:58:04 +02:00
Emil Ernerfeldt 8c5d235bfb
cargo update (#3018)
* cargo update

    Updating crates.io index
    Updating ab_glyph v0.2.20 -> v0.2.21
    Updating aho-corasick v0.7.20 -> v1.0.1
    Updating android-activity v0.4.0 -> v0.4.1
    Updating anyhow v1.0.69 -> v1.0.71
    Updating arrayref v0.3.6 -> v0.3.7
    Updating async-broadcast v0.5.0 -> v0.5.1
    Updating async-executor v1.5.0 -> v1.5.1
    Updating async-io v1.12.0 -> v1.13.0
    Updating async-lock v2.6.0 -> v2.7.0
    Updating async-recursion v1.0.2 -> v1.0.4
    Updating async-task v4.3.0 -> v4.4.0
    Updating async-trait v0.1.64 -> v0.1.68
    Updating atomic_refcell v0.1.9 -> v0.1.10
      Adding base64 v0.21.1
    Updating bindgen v0.64.0 -> v0.65.1
    Updating bitflags v2.1.0 -> v2.3.1
    Updating block-buffer v0.10.3 -> v0.10.4
    Updating bumpalo v3.12.0 -> v3.13.0
    Updating bytemuck v1.13.0 -> v1.13.1
    Updating bytemuck_derive v1.4.0 -> v1.4.1
    Updating cfg-expr v0.11.0 -> v0.15.1
    Updating chrono v0.4.23 -> v0.4.24
    Updating ciborium v0.2.0 -> v0.2.1
    Updating ciborium-io v0.2.0 -> v0.2.1
    Updating ciborium-ll v0.2.0 -> v0.2.1
    Updating clang-sys v1.4.0 -> v1.6.1
    Updating clap v3.2.23 -> v3.2.25
    Updating cocoa-foundation v0.1.0 -> v0.1.1
    Updating concurrent-queue v2.1.0 -> v2.2.0
    Updating core-foundation-sys v0.8.3 -> v0.8.4
    Updating cpufeatures v0.2.5 -> v0.2.7
    Updating crossbeam-utils v0.8.14 -> v0.8.15
    Removing cxx v1.0.89
    Removing cxx-build v1.0.89
    Removing cxxbridge-flags v1.0.89
    Removing cxxbridge-macro v1.0.89
    Updating digest v0.10.6 -> v0.10.7
    Updating dyn-clone v1.0.10 -> v1.0.11
    Updating enum-map v2.4.2 -> v2.5.0
    Updating enumn v0.1.6 -> v0.1.8
    Removing errno v0.2.8
    Updating fastrand v1.8.0 -> v1.9.0
      Adding fdeflate v0.3.0
    Updating flate2 v1.0.25 -> v1.0.26
    Updating futures-core v0.3.26 -> v0.3.28
    Updating futures-io v0.3.26 -> v0.3.28
    Updating futures-lite v1.12.0 -> v1.13.0
    Updating futures-sink v0.3.26 -> v0.3.28
    Updating futures-task v0.3.26 -> v0.3.28
    Updating futures-util v0.3.26 -> v0.3.28
    Updating generic-array v0.14.6 -> v0.14.7
    Updating getrandom v0.2.8 -> v0.2.9
    Updating gimli v0.27.1 -> v0.27.2
    Updating glutin v0.30.4 -> v0.30.8
    Updating glutin_egl_sys v0.4.0 -> v0.5.0
    Updating gpu-alloc v0.5.3 -> v0.5.4
      Adding home v0.5.5
    Updating iana-time-zone v0.1.53 -> v0.1.56
    Updating iana-time-zone-haiku v0.1.1 -> v0.1.2
    Updating image v0.24.5 -> v0.24.6
    Updating indexmap v1.9.2 -> v1.9.3
    Updating io-lifetimes v1.0.6 -> v1.0.10
    Updating itoa v1.0.5 -> v1.0.6
    Updating jni v0.20.0 -> v0.21.1
    Updating jobserver v0.1.25 -> v0.1.26
    Updating js-sys v0.3.61 -> v0.3.63
    Updating libc v0.2.139 -> v0.2.144
    Removing link-cplusplus v1.0.8
    Removing linux-raw-sys v0.1.4
    Removing linux-raw-sys v0.3.2
      Adding linux-raw-sys v0.3.8
    Updating memmap2 v0.5.8 -> v0.5.10
      Adding miniz_oxide v0.7.1
    Updating mio v0.8.5 -> v0.8.6
    Updating naga v0.12.0 -> v0.12.1
    Removing nom8 v0.2.0
    Updating num_enum v0.5.9 -> v0.5.11
    Updating num_enum_derive v0.5.9 -> v0.5.11
    Updating objc2 v0.3.0-beta.3 -> v0.3.0-beta.3.patch-leaks.3
    Updating once_cell v1.17.0 -> v1.17.1
    Updating orbclient v0.3.42 -> v0.3.45
    Updating ordered-stream v0.1.4 -> v0.2.0
    Updating os_str_bytes v6.4.1 -> v6.5.0
    Updating owned_ttf_parser v0.18.1 -> v0.19.0
    Updating parking v2.0.0 -> v2.1.0
    Updating paste v1.0.11 -> v1.0.12
    Updating pkg-config v0.3.26 -> v0.3.27
    Updating plist v1.4.0 -> v1.4.3
    Updating png v0.17.7 -> v0.17.8
    Updating polling v2.5.2 -> v2.8.0
      Adding prettyplease v0.2.5
    Updating proc-macro-crate v1.3.0 -> v1.3.1
    Updating proc-macro2 v1.0.56 -> v1.0.58
    Updating profiling v1.0.7 -> v1.0.8
    Updating puffin v0.14.2 -> v0.14.3
    Updating quick-xml v0.26.0 -> v0.28.2
    Updating quote v1.0.26 -> v1.0.27
    Updating range-alloc v0.1.2 -> v0.1.3
    Updating redox_syscall v0.3.4 -> v0.3.5
    Updating regex v1.7.1 -> v1.8.2
    Removing regex-syntax v0.6.28
      Adding regex-syntax v0.6.29
      Adding regex-syntax v0.7.2
    Updating rfd v0.11.0 -> v0.11.4
    Updating rgb v0.8.35 -> v0.8.36
    Updating rustc-demangle v0.1.21 -> v0.1.23
    Removing rustix v0.36.9
    Removing rustix v0.37.3
      Adding rustix v0.37.19
    Updating ruzstd v0.3.0 -> v0.3.1
    Updating ryu v1.0.12 -> v1.0.13
    Removing scratch v1.0.3
    Updating sctk-adwaita v0.5.3 -> v0.5.4
    Updating serde v1.0.152 -> v1.0.163
    Updating serde_derive v1.0.152 -> v1.0.163
    Updating serde_json v1.0.92 -> v1.0.96
    Updating serde_repr v0.1.10 -> v0.1.12
      Adding serde_spanned v0.6.2
      Adding simd-adler32 v0.3.5
    Updating slab v0.4.7 -> v0.4.8
    Updating socket2 v0.4.7 -> v0.4.9
    Removing syn v1.0.107
    Removing syn v2.0.15
      Adding syn v1.0.109
      Adding syn v2.0.16
    Updating system-deps v6.0.3 -> v6.1.0
      Adding target-lexicon v0.12.7
    Updating tempfile v3.4.0 -> v3.5.0
    Updating thiserror v1.0.38 -> v1.0.40
    Updating thiserror-impl v1.0.38 -> v1.0.40
    Updating time v0.3.17 -> v0.3.21
    Updating time-core v0.1.0 -> v0.1.1
    Updating time-macros v0.2.6 -> v0.2.9
    Updating tiny-skia v0.8.3 -> v0.8.4
    Updating tiny-skia-path v0.8.3 -> v0.8.4
    Updating toml v0.5.11 -> v0.7.4
    Updating toml_datetime v0.5.1 -> v0.6.2
    Updating toml_edit v0.18.1 -> v0.19.9
    Updating tracing-attributes v0.1.23 -> v0.1.24
    Updating tracing-core v0.1.30 -> v0.1.31
    Updating ttf-parser v0.18.1 -> v0.19.0
    Updating tts v0.25.0 -> v0.25.5
    Updating unicode-bidi v0.3.10 -> v0.3.13
    Updating unicode-ident v1.0.6 -> v1.0.8
    Updating walkdir v2.3.2 -> v2.3.3
    Updating wasm-bindgen-futures v0.4.34 -> v0.4.36
    Updating web-sys v0.3.61 -> v0.3.63
    Updating webbrowser v0.8.7 -> v0.8.10
    Removing wepoll-ffi v0.1.2
    Updating windows v0.43.0 -> v0.48.0
    Removing windows-sys v0.42.0
    Updating windows-targets v0.42.1 -> v0.42.2
    Updating windows_aarch64_gnullvm v0.42.1 -> v0.42.2
    Updating windows_aarch64_msvc v0.42.1 -> v0.42.2
    Updating windows_i686_gnu v0.42.1 -> v0.42.2
    Updating windows_i686_msvc v0.42.1 -> v0.42.2
    Updating windows_x86_64_gnu v0.42.1 -> v0.42.2
    Updating windows_x86_64_gnullvm v0.42.1 -> v0.42.2
    Updating windows_x86_64_msvc v0.42.1 -> v0.42.2
    Updating winit v0.28.1 -> v0.28.6
      Adding winnow v0.4.6
    Updating xml-rs v0.8.4 -> v0.8.13
    Updating zbus v3.9.0 -> v3.10.0
    Updating zbus_macros v3.9.0 -> v3.10.0
    Updating zbus_names v2.5.0 -> v2.5.1
    Updating zstd-sys v2.0.6+zstd.1.5.2 -> v2.0.8+zstd.1.5.5
    Updating zvariant v3.10.0 -> v3.14.0
    Updating zvariant_derive v3.10.0 -> v3.14.0
      Adding zvariant_utils v1.0.1

* Downgrade flate2 and png to avoid duplicated deps

* downgrade plist to avoid duplication of base64 crate

* Allow license `Apache-2.0 WITH LLVM-exception`

* Update to puffin 0.15
2023-05-23 09:25:39 +02:00