McRogueFace/wasm_stdlib/lib/python3.14
John McCardle 8c3128e29c WASM Python integration milestone - game.py runs in browser
Major milestone for issue #158 (Emscripten/WebAssembly build target):
- Python 3.14 successfully initializes and runs in WASM
- mcrfpy module loads and works correctly
- Game scripts execute with full level generation
- Entities (boulders, rats, cyclops, spawn points) placed correctly

Key changes:
- CMakeLists.txt: Add 2MB stack, Emscripten link options, preload files
- platform.h: Add WASM-specific implementations for executable paths
- HeadlessTypes.h: Make Texture/Font/Sound stubs return success
- CommandLineParser.cpp: Guard filesystem operations for WASM
- McRFPy_API.cpp: Add WASM path configuration, debug output
- game.py: Make 'code' module import optional (not available in WASM)
- wasm_stdlib/: Add minimal Python stdlib for WASM (~4MB)

Build with: emmake make (from build-emscripten/)
Test with: node mcrogueface.js

Next steps:
- Integrate VRSFML for actual WebGL rendering
- Create HTML page to host WASM build
- Test in actual browsers

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 05:15:11 -05:00
..
collections WASM Python integration milestone - game.py runs in browser 2026-01-31 05:15:11 -05:00
encodings WASM Python integration milestone - game.py runs in browser 2026-01-31 05:15:11 -05:00
importlib WASM Python integration milestone - game.py runs in browser 2026-01-31 05:15:11 -05:00
json WASM Python integration milestone - game.py runs in browser 2026-01-31 05:15:11 -05:00
re WASM Python integration milestone - game.py runs in browser 2026-01-31 05:15:11 -05:00
__future__.py WASM Python integration milestone - game.py runs in browser 2026-01-31 05:15:11 -05:00
_collections_abc.py WASM Python integration milestone - game.py runs in browser 2026-01-31 05:15:11 -05:00
_opcode_metadata.py WASM Python integration milestone - game.py runs in browser 2026-01-31 05:15:11 -05:00
_py_warnings.py WASM Python integration milestone - game.py runs in browser 2026-01-31 05:15:11 -05:00
_sitebuiltins.py WASM Python integration milestone - game.py runs in browser 2026-01-31 05:15:11 -05:00
_weakrefset.py WASM Python integration milestone - game.py runs in browser 2026-01-31 05:15:11 -05:00
abc.py WASM Python integration milestone - game.py runs in browser 2026-01-31 05:15:11 -05:00
annotationlib.py WASM Python integration milestone - game.py runs in browser 2026-01-31 05:15:11 -05:00
ast.py WASM Python integration milestone - game.py runs in browser 2026-01-31 05:15:11 -05:00
base64.py WASM Python integration milestone - game.py runs in browser 2026-01-31 05:15:11 -05:00
bisect.py WASM Python integration milestone - game.py runs in browser 2026-01-31 05:15:11 -05:00
code.py WASM Python integration milestone - game.py runs in browser 2026-01-31 05:15:11 -05:00
codecs.py WASM Python integration milestone - game.py runs in browser 2026-01-31 05:15:11 -05:00
codeop.py WASM Python integration milestone - game.py runs in browser 2026-01-31 05:15:11 -05:00
colorsys.py WASM Python integration milestone - game.py runs in browser 2026-01-31 05:15:11 -05:00
contextlib.py WASM Python integration milestone - game.py runs in browser 2026-01-31 05:15:11 -05:00
copy.py WASM Python integration milestone - game.py runs in browser 2026-01-31 05:15:11 -05:00
copyreg.py WASM Python integration milestone - game.py runs in browser 2026-01-31 05:15:11 -05:00
dataclasses.py WASM Python integration milestone - game.py runs in browser 2026-01-31 05:15:11 -05:00
datetime.py WASM Python integration milestone - game.py runs in browser 2026-01-31 05:15:11 -05:00
dis.py WASM Python integration milestone - game.py runs in browser 2026-01-31 05:15:11 -05:00
enum.py WASM Python integration milestone - game.py runs in browser 2026-01-31 05:15:11 -05:00
fnmatch.py WASM Python integration milestone - game.py runs in browser 2026-01-31 05:15:11 -05:00
functools.py WASM Python integration milestone - game.py runs in browser 2026-01-31 05:15:11 -05:00
game.py WASM Python integration milestone - game.py runs in browser 2026-01-31 05:15:11 -05:00
genericpath.py WASM Python integration milestone - game.py runs in browser 2026-01-31 05:15:11 -05:00
glob.py WASM Python integration milestone - game.py runs in browser 2026-01-31 05:15:11 -05:00
hashlib.py WASM Python integration milestone - game.py runs in browser 2026-01-31 05:15:11 -05:00
heapq.py WASM Python integration milestone - game.py runs in browser 2026-01-31 05:15:11 -05:00
inspect.py WASM Python integration milestone - game.py runs in browser 2026-01-31 05:15:11 -05:00
io.py WASM Python integration milestone - game.py runs in browser 2026-01-31 05:15:11 -05:00
keyword.py WASM Python integration milestone - game.py runs in browser 2026-01-31 05:15:11 -05:00
linecache.py WASM Python integration milestone - game.py runs in browser 2026-01-31 05:15:11 -05:00
opcode.py WASM Python integration milestone - game.py runs in browser 2026-01-31 05:15:11 -05:00
operator.py WASM Python integration milestone - game.py runs in browser 2026-01-31 05:15:11 -05:00
os.py WASM Python integration milestone - game.py runs in browser 2026-01-31 05:15:11 -05:00
pickle.py WASM Python integration milestone - game.py runs in browser 2026-01-31 05:15:11 -05:00
posixpath.py WASM Python integration milestone - game.py runs in browser 2026-01-31 05:15:11 -05:00
pprint.py WASM Python integration milestone - game.py runs in browser 2026-01-31 05:15:11 -05:00
random.py WASM Python integration milestone - game.py runs in browser 2026-01-31 05:15:11 -05:00
reprlib.py WASM Python integration milestone - game.py runs in browser 2026-01-31 05:15:11 -05:00
site.py WASM Python integration milestone - game.py runs in browser 2026-01-31 05:15:11 -05:00
sre_compile.py WASM Python integration milestone - game.py runs in browser 2026-01-31 05:15:11 -05:00
sre_constants.py WASM Python integration milestone - game.py runs in browser 2026-01-31 05:15:11 -05:00
sre_parse.py WASM Python integration milestone - game.py runs in browser 2026-01-31 05:15:11 -05:00
stat.py WASM Python integration milestone - game.py runs in browser 2026-01-31 05:15:11 -05:00
struct.py WASM Python integration milestone - game.py runs in browser 2026-01-31 05:15:11 -05:00
textwrap.py WASM Python integration milestone - game.py runs in browser 2026-01-31 05:15:11 -05:00
token.py WASM Python integration milestone - game.py runs in browser 2026-01-31 05:15:11 -05:00
tokenize.py WASM Python integration milestone - game.py runs in browser 2026-01-31 05:15:11 -05:00
traceback.py WASM Python integration milestone - game.py runs in browser 2026-01-31 05:15:11 -05:00
types.py WASM Python integration milestone - game.py runs in browser 2026-01-31 05:15:11 -05:00
typing.py WASM Python integration milestone - game.py runs in browser 2026-01-31 05:15:11 -05:00
warnings.py WASM Python integration milestone - game.py runs in browser 2026-01-31 05:15:11 -05:00
weakref.py WASM Python integration milestone - game.py runs in browser 2026-01-31 05:15:11 -05:00