Joel,

That's precisely what I was looking into; however, it would be nice to
have a somewhat more automatic way of doing all that housekeeping.
Basically, I want to just define the modules I'm using, and have a
driver script handle the source tree setup, building, and linking.

Lennon

On Thu, 29 Jul 2004 07:14:26 +0900, Joel VanderWerf
<vjoel / path.berkeley.edu> wrote:
> Lennon Day-Reynolds wrote:
> > What *I* really want is just a quick way to statically link a set of
> > extensions into a custom Ruby interpreter. Ideally, it would also
> > include an arbitrary chunk of Ruby code (either as a node tree, or
> > just a constant C string) to be evaluated at startup. I don't need
> > obfuscation, just convenient packaging.
> 
> Don't know whether this qualifies as quick, but why not just put your
> extension in ext/ and build it statically? You have to edit ext/Setup to
> refer to your extension, so that the build process knows you want to
> build it statically. For details, grep for Setup in README.EXT.
> 
> For QNX, I've ended up doing this for all extensions I use, both stdlib
> and otherwise, because ruby on QNX seems to have trouble loading
> dynamically.
> 
> But in any case, it has the effect of creating a custom ruby interpreter
> with your libraries (well, the .so part anyway) built in. You still have
> to load lib/ stuff separately, of course, so this may not help you.
> 
> I guess you could write a C extension that contains a huge string, which
> has all your ruby code, and just evals that string at startup.
> 
>