metaeducation / ren-c

Library for embedding a Rebol interpreter into C codebases
GNU Lesser General Public License v3.0
126 stars 27 forks source link

Move librebol make generation to JavaScript extension #959

Open hostilefork opened 5 years ago

hostilefork commented 5 years ago

Mentioning this as a talking point to bear in mind while doing any hacking on %make-reb-lib.r ...

There's a lot of JavaScript-specific stuff in the %make/tools/make-reb-lib.r file. Ideally, all of it would move out and into the JavaScript extension. So there would need to be a hook point in the make process to do that.

We'd need to factor out the part that provides the scanned list of API entry points. That's necessary anyway, because the TCC extension wants that list too...so it can create runtime symbol exports on Windows. (Linux generally doesn't need to--even if you strip an executable, loaded libraries can get at the non-static symbols of a host executable.)

hostilefork commented 5 years ago

A first step of this has been taken--though it hasn't been generalized. There is just a literal DO of a file in another path from the main libRebol make file, that runs a file in the JavaScript extension directory...which it assumes is present.