Code Monkey home page Code Monkey logo

eframe_template's Introduction

Hi there ๐Ÿ‘‹ ๐Ÿ˜Š

I'm Emil Ernerfeldt, and I like Rust!

I'm the creator of egui, the friendly GUI library.

I am also the co-founder of Rerun, a company making visualization tooling for computer vision and robotics.

Follow me on twitter @ernerfeldt for news about egui and Rerun :)

eframe_template's People

Contributors

alexanderarodin avatar alexkazik avatar ashwinvin avatar austenadler avatar baretuna avatar bglw avatar c-git avatar coderedart avatar daninspace104 avatar elliottslaughter avatar emilk avatar hoptimized avatar imaitland avatar james2022-rgb avatar jimskapt avatar mankinskin avatar markusdd avatar mingun avatar mrtanoshii avatar nhodgesvfx avatar norbert-sebok avatar patrickelectric avatar trappitsch avatar woelper avatar wumpf avatar xosxos avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

eframe_template's Issues

clarification on how to deactivate the cache in development

In the ReadMe you have mentioned

assets/sw.js script will try to cache our app, and loads the cached version when it cannot connect to server allowing your app to work offline (like PWA). appending #dev to index.html will skip this caching, allowing us to load the latest builds during development.

Please could you indicate where to add the #dev. Should I add it to the filesToCache variable inside the sw.js, should i rename the index.html at the root folder or should I append it to the content of index.html at the root folder.

Sorry if my question seems dumb

No function "load" in trait epi::App

Hi, when the template is compiled with the "persistence" feature, it fails to compile it, because there is no "load" function in the trait epi::App, only a "setup" function.

error[E0710]: an unknown tool name found in scoped lint: `rustdoc::private_intra_doc_links`

Hello,

I'm getting 4 errors when using this template:

error[E0710]: an unknown tool name found in scoped lint: `rustdoc::broken_intra_doc_links`
  --> C:\Users\Primary User\.cargo\registry\src\github.com-1ecc6299db9ec823\emath-0.12.0\src\lib.rs:14:5
   |
14 |     rustdoc::broken_intra_doc_links,
   |     ^^^^^^^

error[E0710]: an unknown tool name found in scoped lint: `rustdoc::invalid_codeblock_attributes`
  --> C:\Users\Primary User\.cargo\registry\src\github.com-1ecc6299db9ec823\emath-0.12.0\src\lib.rs:15:5
   |
15 |     rustdoc::invalid_codeblock_attributes,
   |     ^^^^^^^

error[E0710]: an unknown tool name found in scoped lint: `rustdoc::missing_crate_level_docs`
  --> C:\Users\Primary User\.cargo\registry\src\github.com-1ecc6299db9ec823\emath-0.12.0\src\lib.rs:16:5
   |
16 |     rustdoc::missing_crate_level_docs,
   |     ^^^^^^^

error[E0710]: an unknown tool name found in scoped lint: `rustdoc::private_intra_doc_links`
  --> C:\Users\Primary User\.cargo\registry\src\github.com-1ecc6299db9ec823\emath-0.12.0\src\lib.rs:17:5
   |
17 |     rustdoc::private_intra_doc_links
   |     ^^^^^^^

Steps to reproduce:

  • Create Template
  • Clone the repo I just made via Create Template
  • cd egui_test
  • cargo run --release

OS: Windows 10

Let me know if you need any more info about my system/rust setup.

compile error [E0658]

use of unstable library feature 'bool_to_option'
path to it: egui-0.10.0\src\widgets\drag_value.rs:262:26
note: see issue #64260 <https://github.com/rust-lang/rust/issues/64260> for more information

*.bat files dont work for directorie names with spaces

The file build_web.bat from #46
does not work if run from within a directory with Spaces.

I just tried it in a directory OneDrive - CreateCtrl AG and the script tried to find the wasm file in a directory OneDrive.

PS C:\Users\Simon\OneDrive - CreateCtrl AG\programms\test_eframe> .\build_web.bat
C:\Users\Simon\OneDrive - CreateCtrl AG\programms\test_eframe\docs\test_eframe_bg.wasm konnte nicht gefunden werden
Building rust...
error: package ID specification `test_eframe` did not match any packages
Generating JS bindings for wasm...
error: failed to read `C:\Users\Simon\OneDrive\wasm32-unknown-unknown\release\test_eframe.wasm`

Caused by:
    0: failed to read `C:\Users\Simon\OneDrive\wasm32-unknown-unknown\release\test_eframe.wasm`
    1: Das System kann den angegebenen Pfad nicht finden. (os error 3)
Optimizing wasm...
Failed opening 'docs\test_eframe_bg.wasm'
Finished: docs/test_eframe.wasm"
PS C:\Users\Simon\OneDrive - CreateCtrl AG\programms\test_eframe>

from a directory without spaces e.g. C:\Users\Simon\Downloads\eframe_template it works flawlessly.

I dont know how common paths with spaces are (in windows) -- I guess if someone (e.g. @Jimskapt) has some time this could be fixed. But it's probaly not a huge problem.

[rust] or-patterns syntax is experimental

Using rust 1.51.0, running ./setup_web.sh (after #21) results in the following output:

  Compiling wasm-bindgen-cli-support v0.2.75
error[E0658]: or-patterns syntax is experimental
   --> /home/twoxaa/.cargo/registry/src/github.com-1ecc6299db9ec823/wasm-bindgen-cli-support-0.2.75/src/externref.rs:354:23
    |
354 |                 kind: VectorKind::Externref | VectorKind::NamedExternref(_),
    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: see issue #54883 <https://github.com/rust-lang/rust/issues/54883> for more information

error[E0658]: or-patterns syntax is experimental
   --> /home/twoxaa/.cargo/registry/src/github.com-1ecc6299db9ec823/wasm-bindgen-cli-support-0.2.75/src/externref.rs:358:23
    |
358 |                 kind: VectorKind::Externref | VectorKind::NamedExternref(_),
    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: see issue #54883 <https://github.com/rust-lang/rust/issues/54883> for more information

error[E0658]: or-patterns syntax is experimental
   --> /home/twoxaa/.cargo/registry/src/github.com-1ecc6299db9ec823/wasm-bindgen-cli-support-0.2.75/src/externref.rs:362:23
    |
362 |                 kind: VectorKind::Externref | VectorKind::NamedExternref(_),
    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: see issue #54883 <https://github.com/rust-lang/rust/issues/54883> for more information

error[E0658]: or-patterns syntax is experimental
   --> /home/twoxaa/.cargo/registry/src/github.com-1ecc6299db9ec823/wasm-bindgen-cli-support-0.2.75/src/externref.rs:366:23
    |
366 |                 kind: VectorKind::Externref | VectorKind::NamedExternref(_),
    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: see issue #54883 <https://github.com/rust-lang/rust/issues/54883> for more information

error[E0658]: or-patterns syntax is experimental
   --> /home/twoxaa/.cargo/registry/src/github.com-1ecc6299db9ec823/wasm-bindgen-cli-support-0.2.75/src/externref.rs:370:23
    |
370 |                 kind: VectorKind::Externref | VectorKind::NamedExternref(_),
    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: see issue #54883 <https://github.com/rust-lang/rust/issues/54883> for more information

error[E0658]: or-patterns syntax is experimental
   --> /home/twoxaa/.cargo/registry/src/github.com-1ecc6299db9ec823/wasm-bindgen-cli-support-0.2.75/src/externref.rs:374:23
    |
374 |                 kind: VectorKind::Externref | VectorKind::NamedExternref(_),
    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: see issue #54883 <https://github.com/rust-lang/rust/issues/54883> for more information

error[E0658]: or-patterns syntax is experimental
   --> /home/twoxaa/.cargo/registry/src/github.com-1ecc6299db9ec823/wasm-bindgen-cli-support-0.2.75/src/externref.rs:378:23
    |
378 |                 kind: VectorKind::Externref | VectorKind::NamedExternref(_),
    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: see issue #54883 <https://github.com/rust-lang/rust/issues/54883> for more information

error: aborting due to 7 previous errors

For more information about this error, try `rustc --explain E0658`.
error: could not compile `wasm-bindgen-cli-support`

The rustc --explain E0658 suggests to use a nightly build to avoid this error.
I've downloaded 1.56.0-nightly, but it still fails with the same output.

Trunk build fails after first run

so i downloaded the repo and ran trunk build --release
then i changed some things and re-ran trunk build --release but now (and every time i try again)
it errors with

rror from HTML pipeline

Caused by:
    0: error from asset pipeline
    1: could not find WASM output after cargo build
Error: error from HTML pipeline

Caused by:
    0: error from asset pipeline
    1: could not find WASM output after cargo build

any help would be nice

Template crashes on M1 mac

I try compiling and running the template natively on my M1 MacBook air and it crashes with the message:

cargo run
    Finished dev [unoptimized + debuginfo] target(s) in 0.12s
     Running `target/debug/eframe_template`
fish: Job 1, 'cargo run' terminated by signal SIGBUS (Misaligned address error)

An error reporting window compiles the report:

-------------------------------------
Translated Report (Full Report Below)
-------------------------------------

Process:               eframe_template [9468]
Path:                  /Users/USER/Documents/*/eframe_template
Identifier:            eframe_template
Version:               ???
Code Type:             ARM-64 (Native)
Parent Process:        fish [6166]
Responsible:           iTerm2 [1407]
User ID:               501

Date/Time:             2023-07-04 10:10:42.6998 +0200
OS Version:            macOS 13.4.1 (22F82)
Report Version:        12
Anonymous UUID:        A0084DB1-8AEA-596D-03B6-D711C864AD81

Sleep/Wake UUID:       C055D727-CF4F-45C5-B42C-B23FBE7D3BE2

Time Awake Since Boot: 220000 seconds
Time Since Wake:       2663 seconds

System Integrity Protection: enabled

Crashed Thread:        0  main  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_BAD_ACCESS (SIGBUS)
Exception Codes:       UNKNOWN_0x101 at 0x000000000bad4007
Exception Codes:       0x0000000000000101, 0x000000000bad4007

Termination Reason:    Namespace SIGNAL, Code 10 Bus error: 10
Terminating Process:   exc handler [9468]

VM Region Info: 0xbad4007 is not in any region.  Bytes before following region: 4142219257
      REGION TYPE                    START - END         [ VSIZE] PRT/MAX SHRMOD  REGION DETAIL
      UNUSED SPACE AT START
--->  
      __TEXT                      102928000-102e04000    [ 4976K] r-x/r-x SM=COW  ...rame_template

Thread 0 Crashed:: main Dispatch queue: com.apple.main-thread
0   ???                           	         0xbad4007 ???
1   ImageIO                       	       0x18d2d1064 IIOReadPlugin::callInitialize() + 136
2   ImageIO                       	       0x18d2d0d78 IIO_Reader::initImageAtOffset(CGImagePlugin*, unsigned long, unsigned long, unsigned long) + 124
3   ImageIO                       	       0x18d2ce60c IIOImageSource::makeImagePlus(unsigned long, IIODictionary*) + 808
4   ImageIO                       	       0x18d2cdee8 IIOImageSource::getPropertiesAtIndexInternal(unsigned long, IIODictionary*) + 72
5   ImageIO                       	       0x18d2cde24 IIOImageSource::copyPropertiesAtIndex(unsigned long, IIODictionary*) + 24
6   ImageIO                       	       0x18d2cdd2c CGImageSourceCopyPropertiesAtIndex + 276
7   AppKit                        	       0x186a2d008 ImageSourceOptionsForCGImageSource_index_ + 64
8   AppKit                        	       0x186a2ce88 +[NSBitmapImageRep _imagesWithData:hfsFileType:extension:zone:expandImageContentNow:includeAllReps:] + 428
9   AppKit                        	       0x186b4a4d8 +[NSBitmapImageRep imageRepsWithData:] + 68
10  AppKit                        	       0x186b49e34 -[NSImage initWithData:] + 76
11  eframe_template               	       0x102a22668 eframe::native::app_icon::AppTitleIconSe

Etc...

Anyone else having a similar problem? It works in wasm, but not natively.

How do I remove a component?

If I want to click the button to remove a component๏ผŒhow to do that๏ผŸ

I only found the visible attribute in the api

Web build fails in workspace

While the wasm build works just fine if the crate is compiled in a standalone manner, it fails when the crate is in a workspace. To reproduce, create a workspace folder with the following Cargo.toml.

[workspace]

members = [
    "eframe_template",
]

Cloning the repo inside the workspace and running build_web.sh results in the following error.

error[E0432]: unresolved import `egui_winit`                                                              
  --> /home/sayantan/.cargo/registry/src/github.com-1ecc6299db9ec823/egui_glow-0.17.0/src/lib.rs:92:5     
   |                                                                                                      
92 | use egui_winit::winit;                                                                               
   |     ^^^^^^^^^^ use of undeclared crate or module `egui_winit`                                        
                                                                                                          
error[E0432]: unresolved import `egui_winit`                                                              
 --> /home/sayantan/.cargo/registry/src/github.com-1ecc6299db9ec823/egui_glow-0.17.0/src/epi_backend.rs:2:
5                                                                                                         
  |                                                                                                       
2 | use egui_winit::winit;                                                                                
  |     ^^^^^^^^^^ use of undeclared crate or module `egui_winit`                                         
                                                                                                          
error[E0433]: failed to resolve: use of undeclared crate or module `glutin`                               
  --> /home/sayantan/.cargo/registry/src/github.com-1ecc6299db9ec823/egui_glow-0.17.0/src/epi_backend.rs:1
9:5                                                                                                       
   |                                                                                                      
19 |     glutin::WindowedContext<glutin::PossiblyCurrent>,                                                
   |     ^^^^^^ use of undeclared crate or module `glutin`
...

Compilation error on M1

I'm running trunk serve on a fresh clone and I get

  Compiling web-sys v0.3.59
   Compiling wasm-bindgen-futures v0.4.32
   Compiling tracing-wasm v0.2.1
   Compiling emath v0.19.0
   Compiling ron v0.8.0
error: linking with `rust-lld` failed: exit status: 1
  |
  = note: "rust-lld" "-flavor" "wasm" "--rsp-quoting=posix" "--export" "__wbindgen_describe___wbg_log_02e20a3c32305fb7" "--export" "__wbindgen_describe___wbg_log_5c7513aa8c164502" "--export" "__wbindgen_describe___wbg_log_944a2253906cc04f" "--export" "__wbindgen_describe___wbg_log_9f01e2baa8742293" "--export" "__wbindgen_describe___wbg_mark_abc7631bdced64f0" "--export" "__wbindgen_describe___wbg_measure_c528ff64085b7146" "--export" "__externref_drop_slice" "--export" "__externref_heap_live_count" "--export" "__externref_table_alloc" "--export" "__externref_table_dealloc" "--export" "__wbindgen_exn_store" "--export" "__wbindgen_free" "--export" "__wbindgen_malloc" "--export" "__wbindgen_realloc" "--export=__heap_base" "--export=__data_end" "-z" "stack-size=1048576" "--stack-first" "--allow-undefined" "--fatal-warnings" "--no-demangle" "--no-entry" "--export-dynamic" "/Users/alvarozamora/site/target/wasm32-unknown-unknown/debug/deps/tracing_wasm-de3c7e6ece2dba72.tracing_wasm.a2341e97-cgu.0.rcgu.o" "/Users/alvarozamora/site/target/wasm32-unknown-unknown/debug/deps/tracing_wasm-de3c7e6ece2dba72.tracing_wasm.a2341e97-cgu.1.rcgu.o" "/Users/alvarozamora/site/target/wasm32-unknown-unknown/debug/deps/tracing_wasm-de3c7e6ece2dba72.tracing_wasm.a2341e97-cgu.10.rcgu.o" "/Users/alvarozamora/site/target/wasm32-unknown-unknown/debug/deps/tracing_wasm-de3c7e6ece2dba72.tracing_wasm.a2341e97-cgu.11.rcgu.o" "/Users/alvarozamora/site/target/wasm32-unknown-unknown/debug/deps/tracing_wasm-de3c7e6ece2dba72.tracing_wasm.a2341e97-cgu.12.rcgu.o" "/Users/alvarozamora/site/target/wasm32-unknown-unknown/debug/deps/tracing_wasm-de3c7e6ece2dba72.tracing_wasm.a2341e97-cgu.13.rcgu.o" "/Users/alvarozamora/site/target/wasm32-unknown-unknown/debug/deps/tracing_wasm-de3c7e6ece2dba72.tracing_wasm.a2341e97-cgu.14.rcgu.o" "/Users/alvarozamora/site/target/wasm32-unknown-unknown/debug/deps/tracing_wasm-de3c7e6ece2dba72.tracing_wasm.a2341e97-cgu.15.rcgu.o" "/Users/alvarozamora/site/target/wasm32-unknown-unknown/debug/deps/tracing_wasm-de3c7e6ece2dba72.tracing_wasm.a2341e97-cgu.2.rcgu.o" "/Users/alvarozamora/site/target/wasm32-unknown-unknown/debug/deps/tracing_wasm-de3c7e6ece2dba72.tracing_wasm.a2341e97-cgu.3.rcgu.o" "/Users/alvarozamora/site/target/wasm32-unknown-unknown/debug/deps/tracing_wasm-de3c7e6ece2dba72.tracing_wasm.a2341e97-cgu.4.rcgu.o" "/Users/alvarozamora/site/target/wasm32-unknown-unknown/debug/deps/tracing_wasm-de3c7e6ece2dba72.tracing_wasm.a2341e97-cgu.5.rcgu.o" "/Users/alvarozamora/site/target/wasm32-unknown-unknown/debug/deps/tracing_wasm-de3c7e6ece2dba72.tracing_wasm.a2341e97-cgu.6.rcgu.o" "/Users/alvarozamora/site/target/wasm32-unknown-unknown/debug/deps/tracing_wasm-de3c7e6ece2dba72.tracing_wasm.a2341e97-cgu.7.rcgu.o" "/Users/alvarozamora/site/target/wasm32-unknown-unknown/debug/deps/tracing_wasm-de3c7e6ece2dba72.tracing_wasm.a2341e97-cgu.8.rcgu.o" "/Users/alvarozamora/site/target/wasm32-unknown-unknown/debug/deps/tracing_wasm-de3c7e6ece2dba72.tracing_wasm.a2341e97-cgu.9.rcgu.o" "/Users/alvarozamora/site/target/wasm32-unknown-unknown/debug/deps/tracing_wasm-de3c7e6ece2dba72.33emkghic0x4u5ds.rcgu.o" "-L" "/Users/alvarozamora/site/target/wasm32-unknown-unknown/debug/deps" "-L" "/Users/alvarozamora/site/target/debug/deps" "-L" "/Users/alvarozamora/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-unknown-unknown/lib" "/Users/alvarozamora/site/target/wasm32-unknown-unknown/debug/deps/libwasm_bindgen-7381d90e69dfdc8d.rlib" "/Users/alvarozamora/site/target/wasm32-unknown-unknown/debug/deps/libtracing_subscriber-fdd614a5d7fa6eb6.rlib" "/Users/alvarozamora/site/target/wasm32-unknown-unknown/debug/deps/libthread_local-7bcd2b0078c0e51f.rlib" "/Users/alvarozamora/site/target/wasm32-unknown-unknown/debug/deps/libsharded_slab-429288038bbbb0b2.rlib" "/Users/alvarozamora/site/target/wasm32-unknown-unknown/debug/deps/liblazy_static-066ad0656a44cc96.rlib" "/Users/alvarozamora/site/target/wasm32-unknown-unknown/debug/deps/libtracing-9e4cca10b848066a.rlib" "/Users/alvarozamora/site/target/wasm32-unknown-unknown/debug/deps/libcfg_if-58b9d426f806ffd6.rlib" "/Users/alvarozamora/site/target/wasm32-unknown-unknown/debug/deps/libpin_project_lite-f9e39787deda2239.rlib" "/Users/alvarozamora/site/target/wasm32-unknown-unknown/debug/deps/libtracing_core-80d3d1745941828c.rlib" "/Users/alvarozamora/site/target/wasm32-unknown-unknown/debug/deps/libonce_cell-a102fc9aea60d6b5.rlib" "/Users/alvarozamora/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-unknown-unknown/lib/libstd-6e4506c3bd4e06a6.rlib" "/Users/alvarozamora/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-unknown-unknown/lib/libpanic_abort-50ac03b727648902.rlib" "/Users/alvarozamora/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-unknown-unknown/lib/libdlmalloc-158cb6a12317ab51.rlib" "/Users/alvarozamora/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-unknown-unknown/lib/librustc_demangle-bdf1206d3f8ae6ef.rlib" "/Users/alvarozamora/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-unknown-unknown/lib/libstd_detect-397d76d8bd3f3d7e.rlib" "/Users/alvarozamora/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-unknown-unknown/lib/libhashbrown-959ca68b71c716c5.rlib" "/Users/alvarozamora/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-unknown-unknown/lib/libminiz_oxide-ad68ab0ba60287e9.rlib" "/Users/alvarozamora/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-unknown-unknown/lib/libadler-9507aab8973c69a2.rlib" "/Users/alvarozamora/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-unknown-unknown/lib/librustc_std_workspace_alloc-2b254a2ed0d53204.rlib" "/Users/alvarozamora/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-unknown-unknown/lib/libunwind-43d8b49759ddb512.rlib" "/Users/alvarozamora/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-unknown-unknown/lib/libcfg_if-44d429d5b4e07ccb.rlib" "/Users/alvarozamora/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-unknown-unknown/lib/liblibc-f12e412d1fc09ff8.rlib" "/Users/alvarozamora/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-unknown-unknown/lib/liballoc-8c154691168d0cf2.rlib" "/Users/alvarozamora/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-unknown-unknown/lib/librustc_std_workspace_core-ec4bdf0d7fe4b487.rlib" "/Users/alvarozamora/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-unknown-unknown/lib/libcore-011f61430b3e691f.rlib" "/Users/alvarozamora/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-unknown-unknown/lib/libcompiler_builtins-8f04c8042c958fbc.rlib" "-L" "/Users/alvarozamora/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-unknown-unknown/lib" "-L" "/Users/alvarozamora/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-unknown-unknown/lib/self-contained" "-o" "/Users/alvarozamora/site/target/wasm32-unknown-unknown/debug/deps/tracing_wasm-de3c7e6ece2dba72.wasm" "--gc-sections" "--no-entry" "-O2" "-Wl,-undefined,dynamic_lookup"
  = note: rust-lld: error: unknown argument: -Wl,-undefined,dynamic_lookup
          

error: could not compile `tracing-wasm` due to previous error
warning: build failed, waiting for other jobs to finish...
2022-11-08T00:47:03.146144Z ERROR โŒ error
error from HTML pipeline

Caused by:
    0: error from asset pipeline
    1: error during cargo build execution
    2: cargo call returned a bad status
2022-11-08T00:47:03.151156Z  INFO ๐Ÿ“ก serving static assets at -> /
2022-11-08T00:47:03.151520Z  INFO ๐Ÿ“ก server listening at http://127.0.0.1:8080

So, I get a compilation error with rust-lld: error: unknown argument: -Wl,-undefined,dynamic_lookup and despite this trunk serve continues. I am able to get rid of tracing-wasm but then it happens again (same flags) with the main binary.

Can't "build_web.sh"

When I try to build a server, it gives me this error:
error[E0046]: not all trait items implemented, missing: encode--> /home/mikhail/.cargo/registry/src/github.com-1ecc6299db9ec823/rustc-serialize-0.3.24/src/serialize.rs:1358:1 | 853 | fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error>; | ----------------------------------------------------------------encodefrom trait ... 1358 | impl Encodable for path::Path { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missingencode` in implementation

error[E0046]: not all trait items implemented, missing: decode
--> /home/mikhail/.cargo/registry/src/github.com-1ecc6299db9ec823/rustc-serialize-0.3.24/src/serialize.rs:1382:1
|
904 | fn decode<D: Decoder>(d: &mut D) -> Result<Self, D::Error>;
| ----------------------------------------------------------- decode from trait
...
1382 | impl Decodable for path::PathBuf {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing decode in implementation

error: aborting due to 2 previous errors

For more information about this error, try rustc --explain E0046.
error: could not compile rustc-serialize

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: build failed
`

winston no longer works for wasm

First though, brilliant work. You are doing an amazing job here.

Error message
Error: { cli } was removed in [email protected].
Use a custom winston.format = winston.format(function) instead.
at Object.cli (/opt/homebrew/lib/node_modules/winston/lib/winston/common.js:26:13)
at Object. (/opt/homebrew/lib/node_modules/jq/bin/jq:30:9)
at Module._compile (node:internal/modules/cjs/loader:1099:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
at Module.load (node:internal/modules/cjs/loader:975:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12)
at node:internal/main/run_main_module:17:47

Segmentation fault on WSL + VcXsrv

When running the template via cargo run --release, the example runs correctly:
image
But pressing the X to close the window or pressing File>Quit causes a segmentation fault:
image

LLDB Output:
image

Incremental compilation fails because of Rust analyzer invalidating build cache

The problem is tracked at rust-lang/rust-analyzer#12688

This finally explains why we didn't have this issue when we added trunk. The issue only started popping up after #81 where we added unstable web apis flag

[build]
rustflags = ["--cfg=web_sys_unstable_apis"] 

The workaround mentioned is to use

[build]
target = "wasm32-unknown-unknown"

[target.wasm32-unknown-unknown]
rustflags = ["--cfg=web_sys_unstable_apis"]

you can remove the [build] section if you use rust analyzer vscode settings like me and comment out wasm when you need to work on a wasm project.

  // "rust-analyzer.cargo.target": "x86_64-pc-windows-gnu",
  // "rust-analyzer.cargo.target": "wasm32-unknown-unknown",

License

If the idea is to take this template, make modifications, and then build on that, shouldn't it have a license?

SW/Cache not loading due to wrong paths

If the template is hosted under a path, e.g. https://emilk.github.io/**eframe_template/**, the following elements will show 404 errors:

  • manifest.json
  • sw.js
  • icon_ios_touch_192.png

As a result, the service worker fails to load, and the PWA loses its offline/caching capabilities.

Console output for https://emilk.github.io/eframe_template/:

Uncaught (in promise) TypeError: Failed to register a ServiceWorker for scope ('https://emilk.github.io/') with script ('https://emilk.github.io/sw.js'): A bad HTTP response code (404) was received when fetching the script.

Sometimes crash on Linux

egui app using eframe sometimes crash during launch on linux, this happens only first time when launching

I'm using Linuxmint 20.2 with Cinnamon 5.0.6

image

Can not build successful on windows

  1. Clone eframe_template
  2. run setup_web.bat
  3. run build_web.bat

Error info:

'jq' is not recognized as an internal or external command,
operable program or batch file.
Generating JS bindings for wasm...
error: failed to read \wasm32-unknown-unknown\release\eframe_template.wasm

Caused by:
0: failed to read \wasm32-unknown-unknown\release\eframe_template.wasm
1: The system cannot find the path specified. (os error 3)
Finished: docs/eframe_template.wasm"

Cargo warning on build

I used Github to create a repo from this template. Without any modifications to the template, I noticed that running gave me a warning:

$ cargo run --release
warning: unused manifest key: dependencies.eframe.default-dependencies

Maybe this was intended to be default-features?

I'm on Rust 1.65.0 on macOS.

mind your cache

Hi, I'm trying to learn Leptos right now, but when I tried to run it's examples on a local machine I've seen just the leftovers from some eframe stuff I was doing before. When I refreshed the page that stuff was still there despite active Trunk with a Leptos app. Only force update helped (Ctrl+Shift+R).

I'm not saying that there is anything wrong with this template, but I encountered some confusion so I decided to share it. Also I know that there is code in this repo that is responsible for making cache work, maybe it's not 100% correct? is it possible to only ship it in release builds?

Browser: Firefox 113.0.1

cargo run --release error

the error is occur on pull the egui-template and nothing to edit ,how could i fix it ?

Compiling windows v0.42.0
Compiling arboard v3.2.0
Compiling darling v0.14.2
Compiling enumset_derive v0.6.1
Compiling kurbo v0.8.3
Compiling enumset v1.0.12
Compiling ron v0.8.0
Compiling accesskit v0.8.1
Compiling accesskit_consumer v0.10.0
Compiling accesskit_windows v0.10.1
Compiling accesskit_winit v0.7.1
Compiling bytemuck v1.12.3
Compiling ecolor v0.20.0
Compiling emath v0.20.0
Compiling epaint v0.20.0
Compiling egui v0.20.0
Compiling egui-winit v0.20.0
Compiling egui_glow v0.20.0
Compiling eframe v0.20.0
Compiling eframe_template v0.1.0 (D:\java\workspace\rust\eframe_template-master)
Finished dev [unoptimized + debuginfo] target(s) in 4m 38s
Running target\debug\eframe_template.exe
thread 'main' panicked at 'called Option::unwrap() on a None value', C:\Users\xxx.cargo\registry\src\rsproxy.cn-8f6827c7555bfaf8\eframe-0.20.0\src\native\run.rs:399:25

image

Text input is broken on web

Text input has really weird behavior using the eframe template in web. For instance, copying/cutting text is not allowed (This also happens in https://emilk.github.io/eframe_template/). Some other times, text input doesn't work at all except for the tab or enter keys. Surprisingly, this issue doesn't happen in the egui demo (https://egui.rs)

I'm guessing there's a problem with the index.html wrapper.

Cargo Subcommand?

TLDR

Would it be desirable to have a cargo subcommand to create a new project instead of only this template?

Explanation

I'm about to start a new egui project and was about to copy the template again. Then manually make the required changes again and realized this is probably something that should get automated. I'm considering building a cargo subcommand that would:

  1. Ask the user for a project name and run cargo init to create the new project
  2. Download the files from the master branch of this template
  3. Prompt the user for answers and make the changes specified in the getting started
  4. Prompt the user if caching should be disabled
  5. Prompt if "presentation only" files should be deleted, like the readme. (Actually this is the only one I can think of right now but I'd go through the files and check)

This would provide a quick way to spin up a new project and allow users and easy way to opt out of caching at it appears some ppl would prefer not use it. It would also make it easier for ppl who are only testing and do not want caching at all like in this issue.

Trunk build only works at root directory

I'm not sure what component this applies to, so please let me know if I should submit this elsewhere.

The dist/ directory generated by trunk build only works if you place it at the root of the domain. What this means is that I can serve my app from https://example.com/ but not from https://example.com/asdf. Many free hosts do not give you root domain access, so this limits the place you can deploy to. (In particular, shared machines like https://example.com/~user/... will not work.)

You can replicate the issue with this template and a local webserver. The main thing to watch out for is that you must clear your browser cache each time because some aggressive caching will make it work when it is not (or vice versa).

git clone https://github.com/emilk/eframe_template.git
cd eframe_template
trunk build --release
cd dist
# clear browser cache
python3 -m http.server
# go to: http://localhost:8000/
# works
cd ..
# clear browser cache
python3 -m http.server
# go to: http://localhost:8000/dist
# breaks

I use python3 -m http.server as a local webserver, but any software should work, including putting it on a public host with user-level access (https://example.com/~user/).

Would it be possible to generate the build with relative paths so that my application can be located anywhere, even when it's not the root directory of the server?

Ubuntu: native build failed to run with "libEGL warning: DRI2: failed to authenticate"

I've created an example application using this template but native image failed to run with following error:

$ cargo run --release
    Finished release [optimized] target(s) in 0.07s
     Running `/home/mingun/Projects/workspace/target/release/editor`
libEGL warning: DRI2: failed to authenticate

If anybody knows what the reason and how to fix it I appreciate. Web build (using supplied scripts) works fine.

Ubuntu 20.04.3 LTS

minimum for build an egui application

Cant understand what is the minimum to write an agui application. What are the minimum dependencies? The minimum code necessary to get a simple example running.

How do you detect events?

I have a number of items drawing correctly. When the user moves a slider or checks a box, how do I stick an event handler in there and do my processing? I couldn't find an example.

Add `trunk` template alongside current template for web

trunk (https://trunkrs.dev/) is a complete build driver for wasm / web. It is very easy to use and has good defaults, and can easily be configured. I believe instead of using bash scripts and whatnot, it would be better to use trunk so that it's simpler to deploy and work with.

My suggestion would be to keep the scripts, but add a separate branch (or folder?) showing how it looks with trunk. Essentially it's just a simple index.html file at the root of the repository (which trunk uses to configure the build with), as seen like here.

How to build for rolling-release distros?

How to build for rolling-release distros, e.g., Arch Linux?

The dependencies in Cargo.toml:

[package]
name = "hello"
version = "0.1.0"
edition = "2021"
[dependencies]
eframe = "0.19.0"
egui = "0.19.0"

After running cargo run:
error: failed to run custom build command for freetype-sys v0.13.1
Caused by:
process didn't exit successfully: /home/user/hello/target/debug/build/freetype-sys-2d8a8659d607a0d7/build-script-build (exit status: 101) --- stdout
cargo:rerun-if-env-changed=FREETYPE2_NO_PKG_CONFIG cargo:rerun-if-env-changed=PKG_CONFIG_aarch64-unknown-linux-gnu
cargo:rerun-if-env-changed=PKG_CONFIG_aarch64_unknown_linux_gnu
cargo:rerun-if-env-changed=HOST_PKG_CONFIG
cargo:rerun-if-env-changed=PKG_CONFIG
cargo:rerun-if-env-changed=FREETYPE2_STATIC
cargo:rerun-if-env-changed=FREETYPE2_DYNAMIC
cargo:rerun-if-env-changed=PKG_CONFIG_ALL_STATIC cargo:rerun-if-env-changed=PKG_CONFIG_ALL_DYNAMIC
cargo:rerun-if-env-changed=PKG_CONFIG_PATH_aarch64-unknown-linux-gnu
cargo:rerun-if-env-changed=PKG_CONFIG_PATH_aarch64_unknown_linux_gnu
cargo:rerun-if-env-changed=HOST_PKG_CONFIG_PATH
cargo:rerun-if-env-changed=PKG_CONFIG_PATH
cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_aarch64-unknown-linux-gnu
cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_aarch64_unknown_linux_gnu
cargo:rerun-if-env-changed=HOST_PKG_CONFIG_LIBDIR
cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR
cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_aarch64-unknown-linux-gnu
cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_aarch64_unknown_linux_gnu
cargo:rerun-if-env-changed=HOST_PKG_CONFIG_SYSROOT_DIR
cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR
CMAKE_TOOLCHAIN_FILE_aarch64-unknown-linux-gnu = None
CMAKE_TOOLCHAIN_FILE_aarch64_unknown_linux_gnu = None
HOST_CMAKE_TOOLCHAIN_FILE = None
CMAKE_TOOLCHAIN_FILE = None
CMAKE_GENERATOR_aarch64-unknown-linux-gnu = None
CMAKE_GENERATOR_aarch64_unknown_linux_gnu = None
HOST_CMAKE_GENERATOR = None
CMAKE_GENERATOR = None
CMAKE_PREFIX_PATH_aarch64-unknown-linux-gnu = None
CMAKE_PREFIX_PATH_aarch64_unknown_linux_gnu = None
HOST_CMAKE_PREFIX_PATH = None
CMAKE_PREFIX_PATH = None
CMAKE_aarch64-unknown-linux-gnu = None
CMAKE_aarch64_unknown_linux_gnu = None
HOST_CMAKE = None
CMAKE = None
running: "cmake" "/home/user/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/freetype-sys-0.13.1/freetype2" "-DWITH_BZip2=OFF" "-DWITH_HarfBuzz=OFF" "-DWITH_PNG=OFF" "-DWITH_ZLIB=OFF" "-DCMAKE_INSTALL_PREFIX=/home/user/hello/target/debug/build/freetype-sys-def3784904bc2191/out" "-DCMAKE_C_FLAGS= -ffunction-sections -fdata-sections -fPIC" "-DCMAKE_C_COMPILER=/usr/bin/cc" "-DCMAKE_CXX_FLAGS= -ffunction-sections -fdata-sections -fPIC" "-DCMAKE_CXX_COMPILER=/usr/bin/c++" "-DCMAKE_ASM_FLAGS= -ffunction-sections -fdata-sections -fPIC" "-DCMAKE_ASM_COMPILER=/usr/bin/cc" "-DCMAKE_BUILD_TYPE=Release"
-- Configuring incomplete, errors occurred!
See also "/home/user/hello/target/debug/build/freetype-sys-def3784904bc2191/out/build/CMakeFiles/CMakeOutput.log".

--- stderr
CMake Deprecation Warning at CMakeLists.txt:78 (cmake_minimum_required):
Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.

Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.

CMake Error: CMake was unable to find a build program corresponding to "Unix Makefiles". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.
thread 'main' panicked at '
command did not execute successfully, got: exit status: 1

[Ubuntu] Could not find directory of OpenSSL installation

Running ./setup_web.sh produces the following error:

  thread 'main' panicked at '

  Could not find directory of OpenSSL installation, and this `-sys` crate cannot
  proceed without this knowledge. If OpenSSL is installed and this crate had
  trouble finding it,  you can set the `OPENSSL_DIR` environment variable for the
  compilation process.

  Make sure you also have the development packages of openssl installed.
  For example, `libssl-dev` on Ubuntu or `openssl-devel` on Fedora.

  If you're in a situation where you think the directory *should* be found
  automatically, please open a bug at https://github.com/sfackler/rust-openssl
  and include information about your system as well as this message.

  $HOST = x86_64-unknown-linux-gnu
  $TARGET = x86_64-unknown-linux-gnu
  openssl-sys = 0.9.65

Adding libssl-dev to the list of required packages on Linux, in README.md, could be useful to avoid this error.

Contradiction regarding rust version?

In the Testing Locally section of the readme, it says

Make sure you are using the latest version of stable rust by running rustup update

but the repo also includes a toolchain file. Wouldn't that mean that running rustup update wouldn't matter?

Can't build for web in Windows

I use gitbash to build web. With version 0.15 everything works right.
With 0.16 I have problems with JQ and WASM-OPT.
First one I found and download, second - I remove from script (-fast arg isn't enough).
Now I can build my app for web. But it didn't work

Cannot compile on Fedora 36

Seems like some something called fontconfig should be installed. So this does not work with the instructions given in the readme.

error: failed to run custom build command for `servo-fontconfig-sys v5.1.0`

Caused by:
  process didn't exit successfully: `/home/o/Code/egui/eframe_template/target/release/build/servo-fontconfig-sys-8f4c9197a8d3d8ec/build-script-build` (exit status: 101)
  --- stdout
  cargo:rerun-if-env-changed=FONTCONFIG_NO_PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG_x86_64-unknown-linux-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_x86_64_unknown_linux_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG
  cargo:rerun-if-env-changed=FONTCONFIG_STATIC
  cargo:rerun-if-env-changed=FONTCONFIG_DYNAMIC
  cargo:rerun-if-env-changed=PKG_CONFIG_ALL_STATIC
  cargo:rerun-if-env-changed=PKG_CONFIG_ALL_DYNAMIC
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64-unknown-linux-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64_unknown_linux_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_PATH
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64-unknown-linux-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64_unknown_linux_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_LIBDIR
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64-unknown-linux-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64_unknown_linux_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_SYSROOT_DIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR

  --- stderr
  thread 'main' panicked at '`"pkg-config" "--libs" "--cflags" "fontconfig" "fontconfig >= 2.11.1"` did not exit successfully: exit status: 1
  error: could not find system library 'fontconfig' required by the 'servo-fontconfig-sys' crate

  --- stderr
  Package fontconfig was not found in the pkg-config search path.
  Perhaps you should add the directory containing `fontconfig.pc'
  to the PKG_CONFIG_PATH environment variable
  Package 'fontconfig', required by 'virtual:world', not found
  Package 'fontconfig', required by 'virtual:world', not found
  ', /home/o/.cargo/registry/src/github.com-1ecc6299db9ec823/servo-fontconfig-sys-5.1.0/build.rs:34:17
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...

Moving the mouse after expanding the sidebar causes it to go back to original size

Steps to reproduce issue:

  • Opened the example web app at emilk.github.io/eframe_template
  • Drag the bar on the right side of the side panel further to the right, release the mouse
  • Move your mouse

The side bar will shrink back to original size.

EDIT:

This happened on 2 computers in the browser, I also downloaded the source code, ran cargo run --release and the mac native compiled version does this as well. Really don't like this behavior.

Use serde(default) attribute for persistence state structs

Hi!

Currently if I do some things with the app template to have some things that change in the persistant state (e.g. if I click the increment button), then if I add a new field to the state's struct (TemplateApp) all the other fields are reset to their default value. This seems to be because serde doesn't know what to do with the field which isn't in the persistent state, so it kinda refuses to deserialize altogether, yielding None in the load() function, hence resetting all the struct to the default with the unwrap_or_default(). It seems like egui's main demo has this #[serde(default)] line so it seems like someone encountered this issue too at some point :).

It would be useful to add a comment explaining why it's there so that people actually understand what it's for.

Do you want me to create a PR or is it easy enough that you don't mind doing it? :)

Cannot copy text from text edit singleline

I downloaded the template and compiled it. The app has a text-edit-singleline widget with some text. When compiled natively, I can select "Hello World!" and copy it using Ctrl+C , but when compiled for the web, I am able to select the text but not copy it in any way.

Since copying the text was not working for the web, I tried to copy the text programmatically by doing the following:

// If the Copy button is clicked:
if ui.button("Copy").clicked() {
    // Clone the label text into the clipboard.
    ui.output().copied_text = label.clone();
}

Again, copying the code programmatically worked natively but not for the web. I tried this using Firefox in Android, and Firefox in Linux.
Any thoughts on why this is happening? I am writing a small app and I want to copy the text into the clipboard.

Fails with xcb error on startup

Under Linux (X11, Manjaro ARM) the demo app fails with:

[xcb] Unknown sequence number while processing queue
[xcb] Most likely this is a multi-threaded client and XInitThreads has not been called
[xcb] Aborting, sorry about that.
egui_template: xcb_io.c:269: poll_for_event: Assertion `!xcb_xlib_threads_sequence_lost' failed.
Avbruten (SIGABRT) (minnesutskrift skapad)

Edit: Updated rust toolchain from 1.51 ro 1.52. Now trying to run with either release or debug (just "cargo run") gives me:

ibEGL warning: DRI2: failed to authenticate

I have all xcb libraries I can find installed. Any test or further investigation you'd like me to do, just let me know.

Edit 2: I was using software rendering on the machine for some reason. Once I switched to the Panfrost mesa driver it all worked.

Thank you for coming to my monologue, and I hope you've had an enjoyable evening. Feel free to delete this issue if you like.

Cannot compile on Manjaro Linux Ruah 21.3.7

Hello! I've heard that egui is a great UI framework for making a UI on rust, that's why I've been dying to try it out. I'm not very experienced with C++ or C but I've been trying to learn rust doing some applications on the console and it's been great.

Aynway, I've forked this repo on my computer and tried to run it, the only thins I changed on the repo once it downloaded were:
imagen

I tried to compile but it gave an error that CMake was missing, so I installed it but maybe I don't have the correct version (currently I have 3.23.3)? I don't know could someone hep me please! Here's the complete error log:

error: failed to run custom build command for `expat-sys v2.1.6`

Caused by:
  process didn't exit successfully: `/home/elrohirgt/Documentos/Development/Rust/egui-test/target/debug/build/expat-sys-e31a60cca2fcd1f3/build-script-build` (exit status: 101)
  --- stdout
  cargo:rerun-if-env-changed=EXPAT_NO_PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG_x86_64-unknown-linux-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_x86_64_unknown_linux_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG
  cargo:rerun-if-env-changed=EXPAT_STATIC
  cargo:rerun-if-env-changed=EXPAT_DYNAMIC
  cargo:rerun-if-env-changed=PKG_CONFIG_ALL_STATIC
  cargo:rerun-if-env-changed=PKG_CONFIG_ALL_DYNAMIC
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64-unknown-linux-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64_unknown_linux_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_PATH
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64-unknown-linux-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64_unknown_linux_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_LIBDIR
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64-unknown-linux-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64_unknown_linux_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_SYSROOT_DIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR
  CMAKE_TOOLCHAIN_FILE_x86_64-unknown-linux-gnu = None
  CMAKE_TOOLCHAIN_FILE_x86_64_unknown_linux_gnu = None
  HOST_CMAKE_TOOLCHAIN_FILE = None
  CMAKE_TOOLCHAIN_FILE = None
  CMAKE_GENERATOR_x86_64-unknown-linux-gnu = None
  CMAKE_GENERATOR_x86_64_unknown_linux_gnu = None
  HOST_CMAKE_GENERATOR = None
  CMAKE_GENERATOR = None
  CMAKE_PREFIX_PATH_x86_64-unknown-linux-gnu = None
  CMAKE_PREFIX_PATH_x86_64_unknown_linux_gnu = None
  HOST_CMAKE_PREFIX_PATH = None
  CMAKE_PREFIX_PATH = None
  CMAKE_x86_64-unknown-linux-gnu = None
  CMAKE_x86_64_unknown_linux_gnu = None
  HOST_CMAKE = None
  CMAKE = None
  running: "cmake" "/home/elrohirgt/.cargo/registry/src/github.com-1ecc6299db9ec823/expat-sys-2.1.6/expat" "-DBUILD_shared=OFF" "-DBUILD_tools=OFF" "-DBUILD_examples=OFF" "-DBUILD_tests=OFF" "-DCMAKE_INSTALL_PREFIX=/home/elrohirgt/Documentos/Development/Rust/egui-test/target/debug/build/expat-sys-2cc03ec7f699afa0/out" "-DCMAKE_C_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_C_COMPILER=/usr/bin/cc" "-DCMAKE_CXX_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_CXX_COMPILER=/usr/bin/c++" "-DCMAKE_ASM_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_ASM_COMPILER=/usr/bin/cc" "-DCMAKE_BUILD_TYPE=Debug"
  -- Configuring incomplete, errors occurred!
  See also "/home/elrohirgt/Documentos/Development/Rust/egui-test/target/debug/build/expat-sys-2cc03ec7f699afa0/out/build/CMakeFiles/CMakeOutput.log".

  --- stderr
  CMake Error: CMake was unable to find a build program corresponding to "Unix Makefiles".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.
  thread 'main' panicked at '
  command did not execute successfully, got: exit status: 1

  build script failed, must exit now', /home/elrohirgt/.cargo/registry/src/github.com-1ecc6299db9ec823/cmake-0.1.48/src/lib.rs:975:5
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: failed to run custom build command for `freetype-sys v0.13.1`

Caused by:
  process didn't exit successfully: `/home/elrohirgt/Documentos/Development/Rust/egui-test/target/debug/build/freetype-sys-2d3ac5b3e2ed3ae6/build-script-build` (exit status: 101)
  --- stdout
  cargo:rerun-if-env-changed=FREETYPE2_NO_PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG_x86_64-unknown-linux-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_x86_64_unknown_linux_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG
  cargo:rerun-if-env-changed=FREETYPE2_STATIC
  cargo:rerun-if-env-changed=FREETYPE2_DYNAMIC
  cargo:rerun-if-env-changed=PKG_CONFIG_ALL_STATIC
  cargo:rerun-if-env-changed=PKG_CONFIG_ALL_DYNAMIC
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64-unknown-linux-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64_unknown_linux_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_PATH
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64-unknown-linux-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64_unknown_linux_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_LIBDIR
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64-unknown-linux-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64_unknown_linux_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_SYSROOT_DIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR
  CMAKE_TOOLCHAIN_FILE_x86_64-unknown-linux-gnu = None
  CMAKE_TOOLCHAIN_FILE_x86_64_unknown_linux_gnu = None
  HOST_CMAKE_TOOLCHAIN_FILE = None
  CMAKE_TOOLCHAIN_FILE = None
  CMAKE_GENERATOR_x86_64-unknown-linux-gnu = None
  CMAKE_GENERATOR_x86_64_unknown_linux_gnu = None
  HOST_CMAKE_GENERATOR = None
  CMAKE_GENERATOR = None
  CMAKE_PREFIX_PATH_x86_64-unknown-linux-gnu = None
  CMAKE_PREFIX_PATH_x86_64_unknown_linux_gnu = None
  HOST_CMAKE_PREFIX_PATH = None
  CMAKE_PREFIX_PATH = None
  CMAKE_x86_64-unknown-linux-gnu = None
  CMAKE_x86_64_unknown_linux_gnu = None
  HOST_CMAKE = None
  CMAKE = None
  running: "cmake" "/home/elrohirgt/.cargo/registry/src/github.com-1ecc6299db9ec823/freetype-sys-0.13.1/freetype2" "-DWITH_BZip2=OFF" "-DWITH_HarfBuzz=OFF" "-DWITH_PNG=OFF" "-DWITH_ZLIB=OFF" "-DCMAKE_INSTALL_PREFIX=/home/elrohirgt/Documentos/Development/Rust/egui-test/target/debug/build/freetype-sys-f56d584589af4af0/out" "-DCMAKE_C_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_C_COMPILER=/usr/bin/cc" "-DCMAKE_CXX_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_CXX_COMPILER=/usr/bin/c++" "-DCMAKE_ASM_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_ASM_COMPILER=/usr/bin/cc" "-DCMAKE_BUILD_TYPE=Release"
  -- Configuring incomplete, errors occurred!
  See also "/home/elrohirgt/Documentos/Development/Rust/egui-test/target/debug/build/freetype-sys-f56d584589af4af0/out/build/CMakeFiles/CMakeOutput.log".

  --- stderr
  CMake Deprecation Warning at CMakeLists.txt:78 (cmake_minimum_required):
    Compatibility with CMake < 2.8.12 will be removed from a future version of
    CMake.

    Update the VERSION argument <min> value or use a ...<max> suffix to tell
    CMake that the project does not need compatibility with older versions.


  CMake Error: CMake was unable to find a build program corresponding to "Unix Makefiles".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.
  thread 'main' panicked at '
  command did not execute successfully, got: exit status: 1

  build script failed, must exit now', /home/elrohirgt/.cargo/registry/src/github.com-1ecc6299db9ec823/cmake-0.1.48/src/lib.rs:975:5
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Provide a simpler example using egui?

Hi
I have been trying to use egui for several hours and days and I don't understand how to use egui simply.
I'm not a pro dev but I've already buid UI with python.
I can compile the actual egui_template but can you provide a (the most?) simpler and complete example using egui?
Another option could be a basic tutorial? I didn't found one on the web.
Thanks anyway, the actual egui example is very convincing!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.