https://github.com/thenick775/emscripten-issue-10542
https://github.com/thenick775/emscripten-issue-10542
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/thenick775/emscripten-issue-10542
- Owner: thenick775
- Created: 2024-07-14T04:18:06.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-08-17T20:22:23.000Z (10 months ago)
- Last Synced: 2025-01-22T09:32:59.950Z (5 months ago)
- Language: C
- Size: 6.61 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Demo
Minimal repro for [issue](https://github.com/emscripten-core/emscripten/issues/10542)
### Project Structure
```
.
├── CMakeLists.txt # CMake configuration file
├── index.html # HTML file to integrate with Emscripten output
├── main.c # Main C/C++ source file
├── Makefile # Builder for convenience when pulling images
├── pre.js # JavaScript bindings file to disable inputs
├── build/ # Build directory (auto-generated)
│ ├── example.js # Generated JavaScript file
│ ├── example.wasm # Generated WebAssembly file
| ├── index.html # Copied index.html from src
│ └── ...
└── README.md
```### Start the Emscripten Docker container and build the project:
To build with the latest emsdk image, run:
```
make;
```To adjust the docker image version of emsdk, run:
```
make DOCKER_IMAGE_VERSION=3.1.53;
```The emsdk image version shown above allows html inputs to recieve their respective events when disabled.
### Run the Project:
You will need to start a file server of some kind, I am using python:
```
cd ./build && python -m http.server;
```Open the index.html file in a web browser at http://localhost:8000/index.html to run the compiled demo.