-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
C++ JIT compiliation using asmjit #649
Comments
Note that this is only an assembler library, so it would have to be coupled with a C++ compiler. Furthermore actually compiling C++ code at runtime (even if it was possible) would require shipping all the include files of used third party libraries + Tundra core modules. |
It is possible, unreal engine does it. cadaver notifications@github.com wrote:
Sent from my Android phone with K-9 Mail. Please excuse my brevity. |
I should explicitly note however that odds are this is a bad idea security wise and should only be implemented if a way we're found to sandbox it. cadaver notifications@github.com wrote:
Sent from my Android phone with K-9 Mail. Please excuse my brevity. |
It is true that UE4 does runtime compilation, however what I've seen it has been used to tweak the game code, which interfaces with the engine through its own interfaces. A Tundra plugin on the other hand needs full access to the C/C++ standard library, in addition to the Tundra core and the third party libraries. Certainly it is doable, but could be an engineering effort on the man-year scale. For example, if Tundra was to embed clang, which has a nice license, then we would require to always compile the core libraries + dependencies with clang to make sure the C++ ABI and STL implementation matches. Note that the http://runtimecompiledcplusplus.blogspot.com library, which is available as open source, requires the user to have a C++ compiler installed in the system, but we naturally can not require this. I'm very tempted to close this as unfeasible in practice. |
Also, I'm quite sure the end-user runtime of UE4 does not include a C++ compiler. This means the don't need to care how large the files required by the compiler are. We on the other hand would require it on the end-user installs. |
was just thinking that perhaps using this and some other optimization is sometimes possible on servers, or in a CAVE installation where there sometimes is not distribution at all or at least extra work for setting up an efficient env is feasible. also sandboxing / security considerations can be much easier. just a general observation. |
It might be worth investigating using asmjit https://code.google.com/p/asmjit/ as a manner of doing runtime compilation of C++ code. This might help with C++ plugin distribution.
The text was updated successfully, but these errors were encountered: