5 ms·
I experimented with using TCC as an experimental native code compilation backend for a scripting language. Was pretty impressed how easy it was to embed compare
by jamesu 10y ago
I experimented with using TCC as an experimental native code compilation backend for a scripting language. Was pretty impressed how easy it was to embed compared to some other solutions I tried.
- chubot 10y agoInteresting, did your scripting language compile to C first? I'd be interested to see how you integrated TCC if it's available.
- buserror 10y agoCheck my other post: I've recently made a Atmel AVR translator to C and JIT compile it with libtcc. It's actually pretty trivial! https://github.com/buserror/simavr/tree/jit-wip https://github.com/buserror/simavr/tree/jit-wip
- jamesu 10y agoThe language had a fairly basic AST, was fairly C-Like, and used fairly basic programming constructs (e.g. at most functions are just a call into a dispatcher) so it translates reasonably well to C. Didn't pursue the project too far, so not really anything concrete to show. @buserror's project sounds like a better example with code.