Kray-G / kcs

Scripting in C with JIT(x64)/VM.
MIT License
49 stars 6 forks source link

Question: REPL C #57

Open ib00 opened 2 years ago

ib00 commented 2 years ago

Can this be used for REPL C?

Or am I better off using clang-jit?

Kray-G commented 2 years ago

Thanks for your considering to use this product. I very appreciated.

I feel you can use this for REPL C, but I think it depends on your purpose about if you should use clang-jit. If you want to use this on multiple platform for various target architecture like not only x64 but also ARM, etc, then you should use clang-jit. This product is working only on x64 platform so far, but it is much smaller than clang-jit.

Therefore, this product can be one of options which you can choose if you think it is enough to work on only x64 and you want a small component.

It would be nice if this could be helpful and some hints for you.

ib00 commented 2 years ago

Thanks for clarification.

There's two applications:

  1. REPL

Basically, I want to use write some code on and interactively execute it.

  1. My main interest is using JIT to perform compile-time code execution. So, I want to parse C code and then execute it. I have parser, but now I am looking for the simplest possible way to execute this C code.