SomeRanDev / reflaxe.CPP

An alternative C++ target for Haxe that generates dependent-less, GC-less C++17 code.
MIT License
72 stars 5 forks source link

Emscripten support? #9

Open alienself opened 1 year ago

alienself commented 1 year ago

How can I use this project with Emscripten / wasm compilation?

SomeRanDev commented 1 year ago

The project produces C++ files. It does not compile the C++ itself, so you can use the files with the emscripten compiler. @:prependContent meta can be used to prepend arbitrary text to a function, so maybe that can be used to add emscripten meta stuff/macros but I'm not sure, will have to test after this project is complete.

alienself commented 1 year ago

Okay thank you for this tip with @:prependContent! I am going to do some experimentations on my side and will report findings. Really like that this project only generates the c++, it's definitely less of a black box that is hxcpp..