Rename egui_demo to egui_demo_app to avoid confusion with egui_demo_lib

This commit is contained in:
Emil Ernerfeldt 2020-12-29 17:54:52 +01:00
parent 84414e62a3
commit 6d9cdafbc9
13 changed files with 27 additions and 29 deletions

View File

@ -24,7 +24,7 @@ jobs:
command: check
check_egui_demo_web:
name: Check egui_demo (web)
name: Check egui_demo_app (web)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
@ -37,7 +37,7 @@ jobs:
- uses: actions-rs/cargo@v1
with:
command: check
args: -p egui_demo --lib --target wasm32-unknown-unknown
args: -p egui_demo_app --lib --target wasm32-unknown-unknown
test:
name: Test Suite

2
Cargo.lock generated
View File

@ -642,7 +642,7 @@ dependencies = [
]
[[package]]
name = "egui_demo"
name = "egui_demo_app"
version = "0.1.0"
dependencies = [
"eframe",

View File

@ -1,7 +1,7 @@
[workspace]
members = [
"egui_demo_app",
"egui_demo_lib",
"egui_demo",
"egui_glium",
"egui_web",
"egui",

View File

@ -1,4 +1,4 @@
#!/bin/bash
set -eu
cargo run --bin egui_demo --release
cargo run --bin egui_demo_app --release

View File

@ -1,7 +1,7 @@
#!/bin/bash
set -eu
CRATE_NAME="egui_demo"
CRATE_NAME="egui_demo_app"
# This is required to enable the web_sys clipboard API which egui_web uses
# https://rustwasm.github.io/wasm-bindgen/api/web_sys/struct.Clipboard.html

View File

@ -8,7 +8,7 @@ cargo test --workspace --all-targets --all-features
cargo test --workspace --doc
cargo check -p egui_web --lib --target wasm32-unknown-unknown
cargo check -p egui_demo --lib --target wasm32-unknown-unknown
cargo check -p egui_demo_app --lib --target wasm32-unknown-unknown
cargo check -p example_web --lib --target wasm32-unknown-unknown
# For finding bloat:

View File

@ -791,36 +791,36 @@ async function init(input) {
var ret = wasm.memory;
return addHeapObject(ret);
};
imports.wbg.__wbindgen_closure_wrapper308 = function(arg0, arg1, arg2) {
var ret = makeMutClosure(arg0, arg1, 58, __wbg_adapter_24);
imports.wbg.__wbindgen_closure_wrapper633 = function(arg0, arg1, arg2) {
var ret = makeMutClosure(arg0, arg1, 110, __wbg_adapter_24);
return addHeapObject(ret);
};
imports.wbg.__wbindgen_closure_wrapper309 = function(arg0, arg1, arg2) {
var ret = makeMutClosure(arg0, arg1, 58, __wbg_adapter_27);
imports.wbg.__wbindgen_closure_wrapper634 = function(arg0, arg1, arg2) {
var ret = makeMutClosure(arg0, arg1, 110, __wbg_adapter_27);
return addHeapObject(ret);
};
imports.wbg.__wbindgen_closure_wrapper312 = function(arg0, arg1, arg2) {
var ret = makeMutClosure(arg0, arg1, 58, __wbg_adapter_30);
imports.wbg.__wbindgen_closure_wrapper637 = function(arg0, arg1, arg2) {
var ret = makeMutClosure(arg0, arg1, 110, __wbg_adapter_30);
return addHeapObject(ret);
};
imports.wbg.__wbindgen_closure_wrapper314 = function(arg0, arg1, arg2) {
var ret = makeMutClosure(arg0, arg1, 58, __wbg_adapter_33);
imports.wbg.__wbindgen_closure_wrapper639 = function(arg0, arg1, arg2) {
var ret = makeMutClosure(arg0, arg1, 110, __wbg_adapter_33);
return addHeapObject(ret);
};
imports.wbg.__wbindgen_closure_wrapper316 = function(arg0, arg1, arg2) {
var ret = makeMutClosure(arg0, arg1, 58, __wbg_adapter_36);
imports.wbg.__wbindgen_closure_wrapper641 = function(arg0, arg1, arg2) {
var ret = makeMutClosure(arg0, arg1, 110, __wbg_adapter_36);
return addHeapObject(ret);
};
imports.wbg.__wbindgen_closure_wrapper318 = function(arg0, arg1, arg2) {
var ret = makeMutClosure(arg0, arg1, 58, __wbg_adapter_39);
imports.wbg.__wbindgen_closure_wrapper643 = function(arg0, arg1, arg2) {
var ret = makeMutClosure(arg0, arg1, 110, __wbg_adapter_39);
return addHeapObject(ret);
};
imports.wbg.__wbindgen_closure_wrapper320 = function(arg0, arg1, arg2) {
var ret = makeMutClosure(arg0, arg1, 58, __wbg_adapter_42);
imports.wbg.__wbindgen_closure_wrapper645 = function(arg0, arg1, arg2) {
var ret = makeMutClosure(arg0, arg1, 110, __wbg_adapter_42);
return addHeapObject(ret);
};
imports.wbg.__wbindgen_closure_wrapper1111 = function(arg0, arg1, arg2) {
var ret = makeMutClosure(arg0, arg1, 129, __wbg_adapter_45);
imports.wbg.__wbindgen_closure_wrapper1422 = function(arg0, arg1, arg2) {
var ret = makeMutClosure(arg0, arg1, 179, __wbg_adapter_45);
return addHeapObject(ret);
};

View File

@ -57,13 +57,13 @@
</script>
<!-- this is the JS generated by the `wasm-bindgen` CLI tool -->
<script src="egui_demo.js"></script>
<script src="egui_demo_app.js"></script>
<script>
// We'll defer our execution until the wasm is ready to go.
// Here we tell bindgen the path to the wasm file so it can start
// initialization and return to us a promise when it's done.
wasm_bindgen("./egui_demo_bg.wasm")
wasm_bindgen("./egui_demo_app_bg.wasm")
.then(on_wasm_loaded)["catch"](console.error);
function on_wasm_loaded() {

View File

@ -1,5 +1,5 @@
[package]
name = "egui_demo"
name = "egui_demo_app"
version = "0.1.0"
authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"]
license = "MIT OR Apache-2.0"

View File

@ -7,6 +7,4 @@
This crates allows you to compile GUI code written with [Egui](https://crates.io/crates/egui) to [WASM](https://en.wikipedia.org/wiki/WebAssembly) to run on a web page.
Check out [docs/index.html](https://github.com/emilk/egui/blob/master/docs/index.html), [egui_demo](https://github.com/emilk/egui/tree/master/egui_demo) and [build_web.sh](https://github.com/emilk/egui/blob/master/build_web.sh) for examples of how to set it up.
To use `egui_web`, you need to set the `RUSTFLAGS=--cfg=web_sys_unstable_apis` flag.
Check out [egui_template](https://github.com/emilk/egui_template) for an example of how to set it up.