Skip to content
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

Built-in C compiler #448

Open
data-man opened this issue Jan 29, 2022 · 7 comments
Open

Built-in C compiler #448

data-man opened this issue Jan 29, 2022 · 7 comments

Comments

@data-man
Copy link
Contributor

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. ;)

@gittup
Copy link
Owner

gittup commented Jan 29, 2022

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

@data-man
Copy link
Contributor Author

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

@gittup
Copy link
Owner

gittup commented Jan 29, 2022

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?

@data-man
Copy link
Contributor Author

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

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

@gittup
Copy link
Owner

gittup commented Jan 29, 2022

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).

@data-man
Copy link
Contributor Author

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

@CorruptedVor
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants