https://github.com/defold/extension-html5
Example showing how to create a native extension for HTML5
https://github.com/defold/extension-html5
Last synced: 3 months ago
JSON representation
Example showing how to create a native extension for HTML5
- Host: GitHub
- URL: https://github.com/defold/extension-html5
- Owner: defold
- License: mit
- Created: 2017-05-26T11:47:22.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2024-04-11T06:29:29.000Z (almost 2 years ago)
- Last Synced: 2025-01-30T15:25:19.900Z (12 months ago)
- Language: C++
- Homepage:
- Size: 216 KB
- Stars: 13
- Watchers: 21
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# HTML5 Native Extension
## Features
This is a short example of what features the native extension brings for the HTML5 platform
* C/C++ - Add pure C/C++ code or C/C++ libraries built with Emscripten
* [EM_ASM](https://kripken.github.io/emscripten-site/docs/porting/connecting_cpp_and_javascript/Interacting-with-code.html#interacting-with-code-call-javascript-from-native) - Add "in place" JavaScript code directly in your C/C++ code
* JavaScript libraries - Add Emscripten JavaScript libraries. These are JavaScript files with special "hooks" that the Emscripten compiler will react to and merge with the final executable
## Emscripten
[Emscripten](https://kripken.github.io/emscripten-site/docs/) is a Clang based compiler that allows for compiling existing C/C++ code into JavaScript and WebAssembly.
## Example app
The example app demonstrates these features, and also shows an example of how to pass information to the running game.
