Skip to content

Commit bb421c7

Browse files
authored
Remove egui_web and epi (#1545)
* Remove integration name (it is always eframe) * Remove egui_web crate * Move egui_web/CHANGELOG.md into eframe/CHANGELOG.md * Remove all mentions of egui_web * Remove epi crate and absorb into eframe * egui_glow: only use puffin on native * Remove WASM doc from CI (we don't generate it anyways!) * Remove eframe::epi and improve eframe docs
1 parent 18d5292 commit bb421c7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+244
-447
lines changed

.github/workflows/rust.yml

+2-16
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ on: [push, pull_request]
33
name: CI
44

55
env:
6-
# This is required to enable the web_sys clipboard API which egui_web uses
6+
# This is required to enable the web_sys clipboard API which eframe web uses
77
# https://rustwasm.github.io/wasm-bindgen/api/web_sys/struct.Clipboard.html
88
# https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html
99
RUSTFLAGS: --cfg=web_sys_unstable_apis
@@ -160,21 +160,7 @@ jobs:
160160
toolchain: 1.60.0
161161
override: true
162162
- run: sudo apt-get update && sudo apt-get install libspeechd-dev
163-
- run: cargo doc -p eframe -p egui -p egui_extras -p egui_glium -p egui_glow -p egui_web -p egui-winit -p emath -p epaint -p epi --lib --no-deps --all-features
164-
165-
doc_web:
166-
name: cargo doc web
167-
runs-on: ubuntu-latest
168-
steps:
169-
- uses: actions/checkout@v2
170-
- uses: actions-rs/toolchain@v1
171-
with:
172-
profile: minimal
173-
toolchain: 1.60.0
174-
override: true
175-
- run: sudo apt-get update && sudo apt-get install libspeechd-dev
176-
- run: rustup target add wasm32-unknown-unknown
177-
- run: cargo doc -p egui_web --target wasm32-unknown-unknown --lib --no-deps --all-features
163+
- run: cargo doc -p eframe -p egui -p egui_extras -p egui_glium -p egui_glow -p egui-winit -p emath -p epaint --lib --no-deps --all-features
178164

179165
cargo-deny:
180166
runs-on: ubuntu-20.04

ARCHITECTURE.md

+3-10
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Also see [`CONTRIBUTING.md`](https://github.com/emilk/egui/blob/master/CONTRIBUT
55

66

77
## Crate overview
8-
The crates in this repository are: `egui, emath, epaint, egui_extras, epi, egui-winit, egui_web, egui_glium, egui_glow, egui_demo_lib, egui_demo_app`.
8+
The crates in this repository are: `egui, emath, epaint, egui_extras, egui-winit, egui_glium, egui_glow, egui_demo_lib, egui_demo_app`.
99

1010
### `egui`: The main GUI library.
1111
Example code: `if ui.button("Click me").clicked() { … }`
@@ -24,31 +24,24 @@ Depends on `emath`.
2424
### `egui_extras`
2525
This adds additional features on top of `egui`.
2626

27-
### `epi`
28-
Depends only on `egui`.
29-
Adds a thin application level wrapper around `egui` for hosting an `egui` app inside of `eframe`.
30-
3127
### `egui-winit`
3228
This crates provides bindings between [`egui`](https://github.com/emilk/egui) and [winit](https://crates.io/crates/winit).
3329

3430
The library translates winit events to egui, handled copy/paste, updates the cursor, open links clicked in egui, etc.
3531

36-
### `egui_web`
37-
Puts an egui app inside the web browser by compiling to WASM and binding to the web browser with [`js-sys`](https://crates.io/crates/js-sys) and [`wasm-bindgen`](https://crates.io/crates/wasm-bindgen). Paints the triangles that egui outputs using WebGL.
38-
3932
### `egui_glium`
4033
Puts an egui app inside a native window on your laptop. Paints the triangles that egui outputs using [glium](https://github.com/glium/glium).
4134

4235
### `egui_glow`
4336
Puts an egui app inside a native window on your laptop. Paints the triangles that egui outputs using [glow](https://github.com/grovesNL/glow).
4437

4538
### `eframe`
46-
A wrapper around `egui_web` + `egui_glium`, so you can compile the same app for either web or native.
39+
`eframe` is the official `egui` framework, built so you can compile the same app for either web or native.
4740

4841
The demo that you can see at <https://www.egui.rs> is using `eframe` to host the `egui`. The demo code is found in:
4942

5043
### `egui_demo_lib`
51-
Depends on `egui` + `epi`.
44+
Depends on `egui`.
5245
This contains a bunch of uses of `egui` and looks like the ui code you would write for an `egui` app.
5346

5447
### `egui_demo_app`

CHANGELOG.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# egui changelog
22
All notable changes to the `egui` crate will be documented in this file.
33

4-
NOTE: [`epaint`](epaint/CHANGELOG.md), [`eframe`](eframe/CHANGELOG.md), [`egui_web`](egui_web/CHANGELOG.md), [`egui-winit`](egui-winit/CHANGELOG.md), [`egui_glium`](egui_glium/CHANGELOG.md), and [`egui_glow`](egui_glow/CHANGELOG.md) have their own changelogs!
4+
NOTE: [`epaint`](epaint/CHANGELOG.md), [`eframe`](eframe/CHANGELOG.md), [`egui-winit`](egui-winit/CHANGELOG.md), [`egui_glium`](egui_glium/CHANGELOG.md), and [`egui_glow`](egui_glow/CHANGELOG.md) have their own changelogs!
55

66

77
## Unreleased
@@ -366,9 +366,9 @@ NOTE: [`epaint`](epaint/CHANGELOG.md), [`eframe`](eframe/CHANGELOG.md), [`egui_w
366366
* [Add plot legends](https://github.com/emilk/egui/pull/349).
367367
* [Users can now store custom state in `egui::Memory`](https://github.com/emilk/egui/pull/257).
368368
* Add `Response::on_disabled_hover_text` to show tooltip for disabled widgets.
369-
* Zoom input: ctrl-scroll and (on `egui_web`) trackpad-pinch gesture.
369+
* Zoom input: ctrl-scroll and (on `eframe` web) trackpad-pinch gesture.
370370
* Support for raw [multi touch](https://github.com/emilk/egui/pull/306) events,
371-
enabling zoom, rotate, and more. Works with `egui_web` on mobile devices,
371+
enabling zoom, rotate, and more. Works with `eframe` web on mobile devices,
372372
and should work with `egui_glium` for certain touch devices/screens.
373373
* Add (optional) compatibility with [mint](https://docs.rs/mint).
374374

Cargo.lock

+11-33
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

-2
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,10 @@ members = [
66
"egui_extras",
77
"egui_glium",
88
"egui_glow",
9-
"egui_web",
109
"egui-winit",
1110
"egui",
1211
"emath",
1312
"epaint",
14-
"epi",
1513

1614
"examples/confirm_exit",
1715
"examples/custom_3d_glow",

README.md

+5-7
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ If you have questions, use [GitHub Discussions](https://github.com/emilk/egui/di
5858

5959
## Demo
6060

61-
[Click to run egui web demo](https://www.egui.rs/#demo) (works in any browser with WASM and WebGL support). Uses [`egui_web`](https://github.com/emilk/egui/tree/master/egui_web).
61+
[Click to run egui web demo](https://www.egui.rs/#demo) (works in any browser with WASM and WebGL support). Uses [`eframe`](https://github.com/emilk/egui/tree/master/eframe).
6262

6363
To test the demo app locally, run `cargo run --release -p egui_demo_app`.
6464

@@ -160,14 +160,12 @@ An integration needs to do the following each frame:
160160

161161
### Official integrations
162162

163-
If you're making an app, your best bet is using [`eframe`](https://github.com/emilk/egui/tree/master/eframe), the official egui framework. It lets you write apps that work on both the web and native. `eframe` is just a thin wrapper over `egui_web` and `egui_glow` (see below).
164-
165163
These are the official egui integrations:
166164

165+
* [`eframe`](https://github.com/emilk/egui/tree/master/eframe) for compiling the same app to web/wasm and desktop/native. Uses `egui_glow` and `egui-winit`.
167166
* [`egui_glium`](https://github.com/emilk/egui/tree/master/egui_glium) for compiling native apps with [Glium](https://github.com/glium/glium).
168167
* [`egui_glow`](https://github.com/emilk/egui/tree/master/egui_glow) for rendering egui with [glow](https://github.com/grovesNL/glow) on native and web, and for making native apps.
169-
* [`egui_web`](https://github.com/emilk/egui/tree/master/egui_web) for making a web app. Compiles to WASM, renders with WebGL. [Click to run the egui demo](https://www.egui.rs/#demo). Uses `egui_glow`.
170-
* [`egui-winit`](https://github.com/emilk/egui/tree/master/egui-winit) for integrating with [winit](https://github.com/rust-windowing/winit). `egui-winit` is used by `egui_glium` and `egui_glow`.
168+
* [`egui-winit`](https://github.com/emilk/egui/tree/master/egui-winit) for integrating with [winit](https://github.com/rust-windowing/winit).
171169

172170
### 3rd party integrations
173171

@@ -217,7 +215,7 @@ loop {
217215
}
218216
```
219217

220-
For a reference OpenGL backend, see [the `egui_glium` painter](https://github.com/emilk/egui/blob/master/egui_glium/src/painter.rs), [the `egui_glow` painter](https://github.com/emilk/egui/blob/master/egui_glow/src/painter.rs), or [the `egui_web` `WebGL` painter](https://github.com/emilk/egui/blob/master/egui_web/src/webgl2.rs).
218+
For a reference OpenGL backend, see [the `egui_glium` painter](https://github.com/emilk/egui/blob/master/egui_glium/src/painter.rs) or [the `egui_glow` painter](https://github.com/emilk/egui/blob/master/egui_glow/src/painter.rs).
221219

222220
### Debugging your integration
223221

@@ -385,7 +383,7 @@ Notable contributions by:
385383
* [@optozorax](https://github.com/optozorax): [Arbitrary widget data storage](https://github.com/emilk/egui/pull/257).
386384
* [@quadruple-output](https://github.com/quadruple-output): [Multitouch](https://github.com/emilk/egui/pull/306).
387385
* [@EmbersArc](https://github.com/EmbersArc): [Plots](https://github.com/emilk/egui/pulls?q=+is%3Apr+author%3AEmbersArc).
388-
* [@AsmPrgmC3](https://github.com/AsmPrgmC3): [Proper sRGBA blending in `egui_web`](https://github.com/emilk/egui/pull/650).
386+
* [@AsmPrgmC3](https://github.com/AsmPrgmC3): [Proper sRGBA blending for web](https://github.com/emilk/egui/pull/650).
389387
* [@AlexApps99](https://github.com/AlexApps99): [`egui_glow`](https://github.com/emilk/egui/pull/685).
390388
* [@mankinskin](https://github.com/mankinskin): [Context menus](https://github.com/emilk/egui/pull/543).
391389
* [@t18b219k](https://github.com/t18b219k): [Port glow painter to web](https://github.com/emilk/egui/pull/868).

eframe/CHANGELOG.md

+50-11
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
11
# Changelog for eframe
2-
All notable changes to the `eframe` and `epi` crates.
2+
All notable changes to the `eframe` crate.
33

4-
NOTE: [`egui_web`](../egui_web/CHANGELOG.md), [`egui-winit`](../egui-winit/CHANGELOG.md), [`egui_glium`](../egui_glium/CHANGELOG.md), and [`egui_glow`](../egui_glow/CHANGELOG.md) have their own changelogs!
4+
NOTE: [`egui-winit`](../egui-winit/CHANGELOG.md), [`egui_glium`](../egui_glium/CHANGELOG.md), and [`egui_glow`](../egui_glow/CHANGELOG.md) have their own changelogs!
55

66

77
## Unreleased
8-
* Change default for `NativeOptions::drag_and_drop_support` to `true` ([#1329](https://github.com/emilk/egui/pull/1329)).
9-
* Remove the `egui_glium` feature. `eframe` will now always use `egui_glow` as the native backend ([#1357](https://github.com/emilk/egui/pull/1357)).
8+
* Removed `eframe::epi` - everything is now in `eframe` (`eframe::App`, `eframe::Frame` etc) ([#1545](https://github.com/emilk/egui/pull/1545)).
109
* Removed `Frame::request_repaint` - just call `egui::Context::request_repaint` for the same effect ([#1366](https://github.com/emilk/egui/pull/1366)).
11-
* Use full browser width by default ([#1378](https://github.com/emilk/egui/pull/1378)).
12-
* Added new `NativeOptions`: `vsync`, `multisampling`, `depth_buffer`, `stencil_buffer`.
1310
* Changed app creation/setup ([#1363](https://github.com/emilk/egui/pull/1363)):
1411
* Removed `App::setup` and `App::name`.
1512
* Provide `CreationContext` when creating app with egui context, storage, integration info and glow context.
@@ -19,24 +16,39 @@ NOTE: [`egui_web`](../egui_web/CHANGELOG.md), [`egui-winit`](../egui-winit/CHANG
1916
* Changed `App::update` to take `&mut Frame` instead of `&Frame`.
2017
* `Frame` is no longer `Clone` or `Sync`.
2118
* Add `glow` (OpenGL) context to `Frame` ([#1425](https://github.com/emilk/egui/pull/1425)).
22-
* Fixed potential scale bug when DPI scaling changes (e.g. when dragging a window between different displays) ([#1441](https://github.com/emilk/egui/pull/1441)).
2319
* MSRV (Minimum Supported Rust Version) is now `1.60.0` ([#1467](https://github.com/emilk/egui/pull/1467)).
20+
21+
#### Desktop/Native:
22+
* Remove the `egui_glium` feature. `eframe` will now always use `egui_glow` as the native backend ([#1357](https://github.com/emilk/egui/pull/1357)).
23+
* Change default for `NativeOptions::drag_and_drop_support` to `true` ([#1329](https://github.com/emilk/egui/pull/1329)).
24+
* Added new `NativeOptions`: `vsync`, `multisampling`, `depth_buffer`, `stencil_buffer`.
2425
* `dark-light` (dark mode detection) is now an opt-in feature ([#1437](https://github.com/emilk/egui/pull/1437)).
26+
* Fixed potential scale bug when DPI scaling changes (e.g. when dragging a window between different displays) ([#1441](https://github.com/emilk/egui/pull/1441)).
2527
* Added new feature `puffin` to add [`puffin profiler`](https://github.com/EmbarkStudios/puffin) scopes ([#1483](https://github.com/emilk/egui/pull/1483)).
2628
* Moved app persistence to a background thread, allowing for smoother frame rates (on native).
2729

30+
#### Web:
31+
* Use full browser width by default ([#1378](https://github.com/emilk/egui/pull/1378)).
32+
* egui code will no longer be called after panic ([#1306](https://github.com/emilk/egui/pull/1306)).
33+
2834

2935
## 0.17.0 - 2022-02-22
3036
* Removed `Frame::alloc_texture`. Use `egui::Context::load_texture` instead ([#1110](https://github.com/emilk/egui/pull/1110)).
37+
* Shift-scroll will now result in horizontal scrolling on all platforms ([#1136](https://github.com/emilk/egui/pull/1136)).
38+
* Log using the `tracing` crate. Log to stdout by adding `tracing_subscriber::fmt::init();` to your `main` ([#1192](https://github.com/emilk/egui/pull/1192)).
39+
40+
#### Desktop/Native:
3141
* The default native backend is now `egui_glow` (instead of `egui_glium`) ([#1020](https://github.com/emilk/egui/pull/1020)).
32-
* The default web painter is now `egui_glow` (instead of WebGL) ([#1020](https://github.com/emilk/egui/pull/1020)).
3342
* Automatically detect and apply dark or light mode from system ([#1045](https://github.com/emilk/egui/pull/1045)).
3443
* Fix horizontal scrolling direction on Linux.
3544
* Added `App::on_exit_event` ([#1038](https://github.com/emilk/egui/pull/1038))
3645
* Added `NativeOptions::initial_window_pos`.
3746
* Fixed `enable_drag` for Windows OS ([#1108](https://github.com/emilk/egui/pull/1108)).
38-
* Shift-scroll will now result in horizontal scrolling on all platforms ([#1136](https://github.com/emilk/egui/pull/1136)).
39-
* Log using the `tracing` crate. Log to stdout by adding `tracing_subscriber::fmt::init();` to your `main` ([#1192](https://github.com/emilk/egui/pull/1192)).
47+
48+
#### Web:
49+
* The default web painter is now `egui_glow` (instead of WebGL) ([#1020](https://github.com/emilk/egui/pull/1020)).
50+
* Fixed glow failure on Chromium ([#1092](https://github.com/emilk/egui/pull/1092)).
51+
* Updated `eframe::IntegrationInfo::web_location_hash` on `hashchange` event ([#1140](https://github.com/emilk/egui/pull/1140)).
4052
* Expose all parts of the location/url in `frame.info().web_info` ([#1258](https://github.com/emilk/egui/pull/1258)).
4153

4254

@@ -45,20 +57,34 @@ NOTE: [`egui_web`](../egui_web/CHANGELOG.md), [`egui-winit`](../egui-winit/CHANG
4557
* Added `Frame::request_repaint` to replace `repaint_signal` ([#999](https://github.com/emilk/egui/pull/999)).
4658
* Added `Frame::alloc_texture/free_texture` to replace `tex_allocator` ([#999](https://github.com/emilk/egui/pull/999)).
4759

60+
#### Web:
61+
* Fixed [dark rendering in WebKitGTK](https://github.com/emilk/egui/issues/794) ([#888](https://github.com/emilk/egui/pull/888/)).
62+
* Added feature `glow` to switch to a [`glow`](https://github.com/grovesNL/glow) based painter ([#868](https://github.com/emilk/egui/pull/868)).
63+
4864

4965
## 0.15.0 - 2021-10-24
5066
* `Frame` now provides `set_window_title` to set window title dynamically
5167
* `Frame` now provides `set_decorations` to set whether to show window decorations.
5268
* Remove "http" feature (use https://github.com/emilk/ehttp instead!).
53-
* Increase native scroll speed.
5469
* Add `App::persist_native_window` and `App::persist_egui_memory` to control what gets persisted.
70+
71+
#### Desktop/Native:
72+
* Increase native scroll speed.
5573
* Add new backend `egui_glow` as an alternative to `egui_glium`. Enable with `default-features = false, features = ["default_fonts", "egui_glow"]`.
5674

75+
#### Web:
76+
* Implement `eframe::NativeTexture` trait for the WebGL painter.
77+
* Deprecate `Painter::register_webgl_texture.
78+
* Fix multiline paste.
79+
* Fix painting with non-opaque backgrounds.
80+
* Improve text input on mobile and for IME.
81+
5782

5883
## 0.14.0 - 2021-08-24
5984
* Add dragging and dropping files into egui.
6085
* Improve http fetch API.
6186
* `run_native` now returns when the app is closed.
87+
* Web: Made text thicker and less pixelated.
6288

6389

6490
## 0.13.1 - 2021-06-24
@@ -68,16 +94,24 @@ NOTE: [`egui_web`](../egui_web/CHANGELOG.md), [`egui-winit`](../egui-winit/CHANG
6894
## 0.13.0 - 2021-06-24
6995
* `App::setup` now takes a `Frame` and `Storage` by argument.
7096
* `App::load` has been removed. Implement `App::setup` instead.
97+
* Web: Default to light visuals unless the system reports a preference for dark mode.
98+
* Web: Improve alpha blending, making fonts look much better (especially in light mode)
99+
* Web: Fix double-paste bug
71100

72101

73102
## 0.12.0 - 2021-05-10
74103
* Moved options out of `trait App` into new `NativeOptions`.
75104
* Add option for `always_on_top`.
105+
* Web: Scroll faster when scrolling with mouse wheel.
76106

77107

78108
## 0.11.0 - 2021-04-05
79109
* You can now turn your window transparent with the `App::transparent` option.
80110
* You can now disable window decorations with the `App::decorated` option.
111+
* Web: [Fix mobile and IME text input](https://github.com/emilk/egui/pull/253)
112+
* Web: Hold down a modifier key when clicking a link to open it in a new tab.
113+
114+
Contributors: [n2](https://github.com/n2)
81115

82116

83117
## 0.10.0 - 2021-02-28
@@ -89,10 +123,15 @@ NOTE: [`egui_web`](../egui_web/CHANGELOG.md), [`egui-winit`](../egui-winit/CHANG
89123

90124
## 0.9.0 - 2021-02-07
91125
* [Add support for HTTP body](https://github.com/emilk/egui/pull/139).
126+
* Web: Right-clicks will no longer open browser context menu.
127+
* Web: Fix a bug where one couldn't select items in a combo box on a touch screen.
92128

93129

94130
## 0.8.0 - 2021-01-17
95131
* Simplify `TextureAllocator` interface.
132+
* WebGL2 is now supported, with improved texture sampler. WebGL1 will be used as a fallback.
133+
* Web: Slightly improved alpha-blending (work-around for non-existing linear-space blending).
134+
* Web: Call `prevent_default` for arrow keys when entering text
96135

97136

98137
## 0.7.0 - 2021-01-04

0 commit comments

Comments
 (0)