Browse Source

Rename egui_demo to egui_demo_app to avoid confusion with egui_demo_lib

pull/92/head
Emil Ernerfeldt 4 years ago
parent
commit
6d9cdafbc9
  1. 4
      .github/workflows/rust.yml
  2. 2
      Cargo.lock
  3. 2
      Cargo.toml
  4. 2
      build_demo_native.sh
  5. 2
      build_demo_web.sh
  6. 2
      check.sh
  7. 32
      docs/egui_demo_app.js
  8. BIN
      docs/egui_demo_app_bg.wasm
  9. 4
      docs/index.html
  10. 2
      egui_demo_app/Cargo.toml
  11. 0
      egui_demo_app/src/lib.rs
  12. 0
      egui_demo_app/src/main.rs
  13. 4
      egui_web/README.md

4
.github/workflows/rust.yml

@ -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

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

2
Cargo.toml

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

2
build_demo_native.sh

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

2
build_demo_web.sh

@ -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

2
check.sh

@ -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:

32
docs/egui_demo.js → docs/egui_demo_app.js

@ -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);
};

BIN
docs/egui_demo_bg.wasm → docs/egui_demo_app_bg.wasm

Binary file not shown.

4
docs/index.html

@ -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() {

2
egui_demo/Cargo.toml → egui_demo_app/Cargo.toml

@ -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"

0
egui_demo/src/lib.rs → egui_demo_app/src/lib.rs

0
egui_demo/src/main.rs → egui_demo_app/src/main.rs

4
egui_web/README.md

@ -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.

Loading…
Cancel
Save