c3lang / c3c

Compiler for the C3 language
GNU Lesser General Public License v3.0
1.34k stars 80 forks source link

Compiled standard library #1082

Open Wiguwbe opened 7 months ago

Wiguwbe commented 7 months ago

Hey there,

Would it make sense (or be possible even) to have the c3's standard library being compiled into either an .so (dynamic library) or a bunch of .a (static library/archives)?

The lib definitions would be just the .c3i files/interface.

Of course that the templates wouldn't be compiled, but I don't know how templating works internally.

lerno commented 7 months ago

It is possible. I've toyed with the idea several times, but there are some things that need to be ironed out before that. For example, usually you can extend anything. Without the source code that is somewhat limited, so some care must be taken to make it work. Also, the .c3i files should be generated automatically.