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

2
Cargo.lock generated
View File

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

View File

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

View File

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

View File

@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
set -eu 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 # 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 # 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 test --workspace --doc
cargo check -p egui_web --lib --target wasm32-unknown-unknown 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 cargo check -p example_web --lib --target wasm32-unknown-unknown
# For finding bloat: # For finding bloat:

View File

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

View File

@ -57,13 +57,13 @@
</script> </script>
<!-- this is the JS generated by the `wasm-bindgen` CLI tool --> <!-- 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> <script>
// We'll defer our execution until the wasm is ready to go. // 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 // 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. // 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); .then(on_wasm_loaded)["catch"](console.error);
function on_wasm_loaded() { function on_wasm_loaded() {

View File

@ -1,5 +1,5 @@
[package] [package]
name = "egui_demo" name = "egui_demo_app"
version = "0.1.0" version = "0.1.0"
authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"] authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"]
license = "MIT OR Apache-2.0" 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. 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. Check out [egui_template](https://github.com/emilk/egui_template) for an example of how to set it up.
To use `egui_web`, you need to set the `RUSTFLAGS=--cfg=web_sys_unstable_apis` flag.