gittup/tup

Built-in C compiler

data-man opened this issue · 7 comments

The best candidates in my humble opinion:

  • Tiny C (i386/x86_64/arm/aarch64/riscv64), LGPL-2.1 Licensed
  • mir (x86_64/aarch64/ppc64be/ppc64le/s390x/riscv64), MIT Licensed

If you don't mind the idea, I can start working on it. ;)

I'm not sure what the idea is :). Can you elaborate on what you're trying to achieve?

Light-speed compiling without communication with an external compiler. 😄

You mean tup would compile files without doing a fork()/exec()? How much time would that save vs. invoking the compiler?

And is most of the overhead of the fork/exec really just FUSE? What is the overhead of using the ldpreload server with fork/exec as compared to a built-in compiler?

You mean tup would compile files without doing a fork()/exec()?

Yes.
I can't say anything until I try it. :)

I guess give it a shot and see how it goes! I imagine it could be implemented similarly to !tup_ln (mostly in parser.c and updater.c I think).

Just thought: Tiny C can be used as a very fast scripting engine.
That could be a good alternative to Lua. :)

Honestly neither belong in tup, if you really want to use a programming language you can use that to generate a tupfile and then run it - perhaps from standard input instead?