Commit Graph

116 Commits

Author SHA1 Message Date
Emil Ernerfeldt 814ad0783c
Update to wgpu 0.20 (#4560)
* this PR reverts https://github.com/emilk/egui/pull/4559
* and re-applies https://github.com/emilk/egui/pull/4433

Before we merge, we're waiting for a wgpu 0.20.1 patch-release of

* https://github.com/gfx-rs/wgpu/pull/5681

---------

Co-authored-by: Andreas Reich <r_andreas2@web.de>
2024-06-13 15:00:23 +02:00
Emil Ernerfeldt 54429e0549
Revert update to wgpu 0.20 => downgrade to wgpu 0.19.1 (#4559)
0.20 has a bunch of bugs that will be fixed by:

* https://github.com/gfx-rs/wgpu/pull/5681

At Rerun, we don't want to wait for the wgpu 0.20.1 patch release before
we update egui, so we will temporarily downgrade to wgpu 0.19

After reverting I'll open a new PR that will update to 0.20 again, with
the intention of merging that once 0.20.1 is released.
2024-05-28 14:40:43 +02:00
Simon Niedermayr c9b24d5a5c
Update to wgpu 0.20 (#4433)
updates the wgpu version to 0.20 and changes the API calls accordingly. 
I had to update wasm-bindgen to "0.2.92". Otherwise, I got this error
for the demo app:
```
error: failed to select a version for `wasm-bindgen`.
    ... required by package `js-sys v0.3.69`
    ... which satisfies dependency `js-sys = "^0.3.69"` of package `eframe v0.27.2 (/home/user/Projects/egui/crates/eframe)`
    ... which satisfies path dependency `eframe` (locked to 0.27.2) of package `confirm_exit v0.1.0 (/home/user/Projects/egui/examples/confirm_exit)`
versions that meet the requirements `^0.2.92` are: 0.2.92

all possible versions conflict with previously selected packages.

  previously selected package `wasm-bindgen v0.2.90`
    ... which satisfies dependency `wasm-bindgen = "=0.2.90"` of package `egui_demo_app v0.27.2 (/home/user/Projects/egui/crates/egui_demo_app)`

failed to select a version for `wasm-bindgen` which could resolve this conflict
```

Why is it locked to this version right now?

I ran the tests, checked the web demo and my own projects, and
everything seems to work fine with wgpu 0.20.

---------

Co-authored-by: Andreas Reich <r_andreas2@web.de>
2024-04-30 11:47:12 +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
Emil Ernerfeldt cee790681d
Update to Rust 1.76 (#4411)
Motivation: I want to replace `cargo-cranky` with workspace lints, first
available in Rust 1.74.
However, `cargo doc` would hange on `wgpu` and `wgpu-core` on 1.74 and
1.75… so now we're on 1.76.
I think this is fine - when 1.78 is released next week we're still two
versions behind the bleeding edge.

…and the branch name is just wrong 🤦
2024-04-25 15:51:01 +02:00
Emil Ernerfeldt d99fabaef5
Add another check to Windows CI (#4038)
To see if we can catch the problem in
https://github.com/emilk/egui/pull/4037
2024-02-13 12:35:49 +01:00
Emil Ernerfeldt 45e9e8df00 PR template: remind contributors to pick good PR titles 2024-02-06 09:22:14 +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 beb4714e40 Update the web-demo CI action with the new folder name 2023-11-16 16:45:06 +01:00
Emil Ernerfeldt 8723c5a4d3 Try another gh-pages publish workflow 2023-11-16 16:32:19 +01:00
Emil Ernerfeldt 8a66040ad9
CI: Add workflow to publish web-demo to `gh-pages` branch on each PR (#3559)
The goal is to host the egui web-demo on its own `gh-pages` branch, and
have the CI build and publish a new demo on each merged CI.

Let's see if I can get this to work…
2023-11-16 16:23:31 +01:00
Nolan Darilek d0ff09ac20
Update accesskit and accesskit_winit. (#3475)
* Update accesskit and accesskit_winit.

* Remove duplicated `libgtk-3-dev`

---------

Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
2023-11-10 11:32:30 +01:00
Ryan Hileman 7169f28ddf
grammar fix in pr template (#3514) 2023-11-10 11:18:16 +01:00
Emil Ernerfeldt b5e3502067
Add link checking to CI (#3445)
* Add link checking to CI, plus another spell checker

* Only spell-check markdown

* Avoid rate-limiting

* Fix some links

* Disable cspell
2023-10-08 09:30:54 +02:00
Emil Ernerfeldt 35945dea46
Misc code cleanup (#3398)
* eframe README: explain how to enable copy/paste

* Implement Debug for a couple of structs

* Code cleanup

* Better docs

* profile ron serialization

* CI: Allow "exclude from changelog" as the only label
2023-09-27 09:06:17 +02:00
Emil Ernerfeldt 23ce4e70ca
Add option to show a callstack to the widget under the mouse (#3391) 2023-09-26 15:50:35 +02:00
Emil Ernerfeldt 5e785ae00a
Add syntax highlighing feature to `egui_extras` (#3333)
* Add syntax highlighing feature to egui_extras

Enable "syntect" feature for great syntax highlighting of any language.

If not a simple fallback is used that works fine for C++, Rust, Python

* Check --no-default-features of egui_extras on CI

* spelling

* Fix building egui_extras without additional features
2023-09-13 20:39:40 +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 e3362dafac
CI: Update to actions/checkout@v4 (#3304) 2023-09-05 10:18:38 +02:00
Emil Ernerfeldt 7b169ec13d
Break out plotting to own crate `egui_plot` (#3282)
This replaces `egui::plot` with the new crate `egui_plot`
2023-08-27 17:22:49 +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 d568d9f5d0
Lint vertical spacing in the code (#3224)
* Lint vertical spacing in the code

* Add some vertical spacing for readability
2023-08-10 15:26:54 +02:00
Emil Ernerfeldt abe91b00a4 Improve generate_changelog.py 2023-08-09 17:13:22 +02:00
Emil Ernerfeldt 46daaa8a34 Improve PR template 2023-08-09 12:51:22 +02:00
Emil Ernerfeldt 9c15783fab CI: update list of accepted PR labels 2023-08-09 12:51:08 +02:00
Dirk Stolle 9731cfd9cf
Update GitHub Actions CI (#3150)
The following updates are performed:
* update actions/checkout to v3
* replace unmaintained actions-rs/toolchain by dtolnay/rust-toolchain
* replace unmaintained actions-rs/cargo by direct invocation of cargo
2023-08-09 12:50:33 +02:00
Emil Ernerfeldt bb252e2788
Check `egui_extras --all-features` on CI (#3019)
* Check egui_extras --all-features on CI

* Fix egui_extras with `datepicker` feature
2023-05-23 09:26:40 +02:00
Emil Ernerfeldt 856afc8f7e
Update wasm-bindgen to 0.2.86 (#2995) 2023-05-17 11:08:35 +02:00
Emil Ernerfeldt 834e2e9f50
Fix: `request_repaint_after` works even when called from background thread (#2939)
* Refactor repaint logic

* request_repaint_after also fires the request_repaint callback

* Bug fixes

* Add test to egui_demo_app

* build_demo_web: build debug unless --release is specified

* Fix the web backend too

* Run special clippy for wasm, forbidding some types/methods

* Remove wasm_bindgen_check.sh

* Fix typos

* Revert "Remove wasm_bindgen_check.sh"

This reverts commit 92dde25344.

* Only run cranky/clippy once
2023-04-20 10:56:52 +02:00
Emil Ernerfeldt 902bcfe6aa
Add script to generate changelogs (#2920)
* Add script to generate changelogs from PR labels

* Improve PR template

* Better categorization
2023-04-18 18:58:12 +02:00
Emil Ernerfeldt 03c1a05e49 Rename `sh/` folder to `scripts/` 2023-04-18 17:10:52 +02:00
Emil Ernerfeldt 93ee554af5
Check more target triples with cargo deny (#2919) 2023-04-18 16:10:53 +02:00
Emil Ernerfeldt 4809747952
Check for typos on CI (#2918)
* Check for typos on CI

* Fix all typos
2023-04-18 16:10:20 +02:00
Robert Bragg 89e42884fc
Remove android-activity dependency + add activity features (#2863)
Instead of depending on android-activity directly, this exposes the
android-native-activity and android-game-activity features from Winit.

This ensures that applications can choose what android-backend they use
while also relying on Winit to decide what version of android-activity to
use - without increasing the risk of a version conflict by having a direct
dependency.

_(NB: Egui doesn't currently use the android-activity API itself)_

Since android-activity provides the `android_main()` entry point for
Android applications it's not possible to link in multiple version of
the android-activity crate and so it's particularly important to
avoid unnecessary direct dependencies that could cause a version
conflict in the future.

To help avoid the need for applications to directly depend on
android-activity the Winit crate re-exports the android-activity API
and exposes features to configure the backend so that application crates
can instead rely on Winit to pull in a compatible version of
android-activity. (This way version bumps for android-activity only
need to be synchronized with the Winit crate).

CI now enables the `android-native-activity` feature for testing.

Fixes: #2829
Fixes: #2720
Closes: #2834
2023-04-18 15:40:30 +02:00
Emil Ernerfeldt b604b6200c
Update yanked deps (#2917)
* Update crossbeam-channel 0.56 to 0.58

* Update enumflags2

* CI: cargo check epaint --no-default-features
2023-04-18 15:27:31 +02:00
Emil Ernerfeldt b8816d6988
Run cargo-deny on a matrix of targets (#2852)
* Run cargo-deny on a matrix of targets

* Try rust-cache

* Restrict the number of OSes
2023-03-30 09:12:11 +02:00
Emil Ernerfeldt df7e5bd57a
Allow compiling eframe with `--no-default-features` (#2728)
* Check that we can compile eframe with --no-default-features

* Allow compiling eframe with `--no-default-features`

This is useful for libraries that depend on `eframe::Frame`
but don't care what renderer eframe is using.
2023-02-12 19:29:42 +01:00
Emil Ernerfeldt ebeb788b1f
We no longer use tts, so remove speech-related dependencies (#2698) 2023-02-08 18:45:44 +01:00
Emil Ernerfeldt 449dd1c23c
cargo update (#2697)
* cargo update

    Updating anyhow v1.0.68 -> v1.0.69
    Updating bindgen v0.63.0 -> v0.64.0
    Removing cocoa v0.24.1
    Updating glutin v0.30.3 -> v0.30.4
    Updating glutin_egl_sys v0.3.1 -> v0.4.0
    Updating glutin_glx_sys v0.3.0 -> v0.4.0
    Updating glutin_wgl_sys v0.3.0 -> v0.4.0
    Updating proc-macro2 v1.0.50 -> v1.0.51
    Updating rgb v0.8.34 -> v0.8.35
    Updating serde_json v1.0.91 -> v1.0.92
    Updating tiny-skia v0.8.2 -> v0.8.3
    Updating tiny-skia-path v0.8.2 -> v0.8.3
    Removing windows-sys v0.36.1
    Removing windows_aarch64_msvc v0.36.1
    Removing windows_i686_gnu v0.36.1
    Removing windows_i686_msvc v0.36.1
    Removing windows_x86_64_gnu v0.36.1
    Removing windows_x86_64_msvc v0.36.1
    Updating zbus v3.8.0 -> v3.9.0
    Updating zbus_macros v3.8.0 -> v3.9.0

* Update wasm-bindgen to 0.2.84

* cargo update

    Updating js-sys v0.3.60 -> v0.3.61
    Updating wasm-bindgen-futures v0.4.33 -> v0.4.34
    Updating web-sys v0.3.60 -> v0.3.61

* Update pollster to 0.3

* Update rfd to 0.11

* Make sure we never depend on cmake
2023-02-08 18:11:34 +01:00
Emil Ernerfeldt 4721a0a680
Check --all-targets in CI (#1395) 2023-02-08 09:35:01 +01:00
Andreas Reich b52cd2052f
Support for transparent backbuffer in wgpu winit binding (#2684)
* Support for transparent backbuffer in wgpu winit binding
Choose best fitting composite alpha mode on the fly.

* Compilation fix

* Add line to eframe CHANGELOG

* Attempt to mollify CI: try different way to install apt packages

---------

Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
2023-02-06 14:16:17 +01:00
John Hughes 8c59888ebd
Add simple Windows CI workflow check (#2663)
* Add simple Windows CI workflow check

* Fix Windows build in CI

* Windows fix
2023-02-03 13:19:12 +01:00
Emil Ernerfeldt e613315866 Improve issue templates 2022-12-02 09:51:21 +01:00
Emil Ernerfeldt eca5e6a4d2
Update to Rust 1.65 (#2314)
* Update to Rust 1.65

Because then you can use dynamic linking on Linux

* Fix a bunch of clippy lints

* Update changelogs

* More clippy fixes
2022-11-16 19:08:03 +01:00
Red Artist 8ff139687a
bump msrv 1.64 and tts + bindgen dep (#2274)
* bump msrv 1.64 and tts + bindgen dep

* Update crates/egui-winit/Cargo.toml

Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>

* Update crates/eframe/Cargo.toml

Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>

Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
2022-11-11 10:27:25 +01:00
ItsEthra 4d1e858a52
Use total_cmp for clamping drag value in order to avoid floating point ambiguities (#2213)
* Use total_cmp for clamping DragValue

* Added test for clamping

* Increase MSRV in all crates

* Increased rust version for github actions and lib.rs

* Inversed ranges are now working properply with clamp_to_range

* Added more tests
2022-11-02 19:38:39 +01:00
Emil Ernerfeldt 2b1341095d
CI: Run cargo clippy for wasm32-unknown-unknown (#2200)
* CI: Run cargo clippy for wasm32-unknown-unknown

* wasm32 clippy fixes

* Document when AppRunner::new can fail
2022-10-30 20:55:07 +01:00