Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Emscripten builds to single file, no need for http server, no browser security restrictions #8153

Open
Pe3ucTop opened this issue Nov 15, 2024 · 1 comment

Comments

@Pe3ucTop
Copy link

Pe3ucTop commented Nov 15, 2024

Version/Branch of Dear ImGui:

Version: any , Branch: any

Back-ends:

  • imgui_impl_glfw.cpp + imgui_impl_opengl3.cpp
  • imgui_impl_glfw.cpp + imgui_impl_wgpu.cpp ( with examples/libs/emscripten/shell_minimal.html modifications )

Compiler, OS:

Linux + Emscripten

Full config/build information:

No response

Details:

Suggestion for builds with Emscripten to use Makefile linker flag: LDFLAGS += -sSINGLE_FILE which will result in single html file output (EXE = $(WEB_DIR)/index.html).

Goals of single output file:

  • no need for http server, file could be opened directly by Web browser;
  • no Web browser security restrictions for hardware use requests (serial port in my condition and should be the same for gamepad / usb / audio / camera / etc );
  • easy to redistribute.

Negative aspect:

  • output file is bigger then sum of all files of split build because of included binary files got converted to BASE64 format.

Screenshots/Video:

No response

Minimal, Complete and Verifiable Example code:

No response

@ocornut
Copy link
Owner

ocornut commented Nov 15, 2024 via email

@ocornut ocornut changed the title [Feature request] Emscripten builds to single file, no need for http server, no browser security restrictions. Emscripten builds to single file, no need for http server, no browser security restrictions Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants