Skip to content

Instantly share code, notes, and snippets.

@devappd
devappd / CMakeLists.txt
Created January 28, 2021 01:16
CMake Emscripten sample
# CMakeLists.txt
# Entry-point for build configuration.
#
# Copyright (c) 2021 David Apollo (77db70f775fa0b590889c45371a70a1d23e99869d4565976a5207c11606fb6aa)
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# distribute, sublicense, and/or sell copies of the Software, and to
@devappd
devappd / build.sh
Created January 26, 2021 06:01
Asyncify event.preventDefault() test
mkdir -p bin
emcc -o bin/main.html main.c -s SINGLE_FILE=1
emcc -o bin/main-asyncify.html main.c -s ASYNCIFY=1 -s SINGLE_FILE=1
@devappd
devappd / build.sh
Last active November 2, 2023 18:28
Minimal OpenGL Emscripten example
mkdir -p bin
emcc -o bin/main.html main.cpp -s USE_SDL=2 -s FULL_ES2=1 -s SINGLE_FILE=1
emcc -o bin/main-asyncify.html main.cpp -s USE_SDL=2 -s FULL_ES2=1 -s ASYNCIFY=1 -s SINGLE_FILE=1