Is anybody working on a ruby compiler (rb->exe)

Cool… but are there any english docs on exerb? How
exactly does
it
create a binary? (the quick 10000 foot overview please)

There is an English readme file included in the archive. It gives you the steps
to install/configure it. Erally straightforward. The only slightly odd piece is
creating a text file that the compiler uses to determine what files are needed.

It looks like it just concatenates an approx 700k intrepreter with the bytecode.

Hope that helps,

Christopher

Christopher J. Meisenzahl CPS, CSTE
Senior Software Testing Consultant
Spherion
christopher.j.meisenzahl@citicorp.com

···

-----Original Message-----
From: alan [mailto:alan@digikata.com]
Sent: Thursday, August 29, 2002 12:09 PM
To: ruby-talk
Cc: alan
Subject: Re: Is anybody working on a ruby compiler (rb->exe)

On Thu, Aug 29, 2002 at 12:52:02PM +0900, Phil Tomson wrote:

In article akk3ku02k6v@enews1.newsguy.com,
Phil Tomson ptkwt@shell1.aracnet.com wrote:

In article H00019f008a50006@MHS,
christopher.j.meisenzahl@citicorp.com wrote:

FWIW, I just tried the exerb compiler with the latest
Ruby release,
it
installed with no trouble. And I got it to compile a very
trivial Ruby example
and it works! :wink:

Cool… but are there any english docs on exerb? How
exactly does
it
create a binary? (the quick 10000 foot overview please)

OK, to answer my own post, I overcame my laziness and
downloaded the
tar
file. There is an english readme file. It appears that
this only works
for Windows (the exe part of the name should have been an
indication).

Looks pretty straightforward on Windows, though.

I wonder how difficult it would be to get this to work under Linux
(and
other Unices)…

Phil

Well, it cross compiles from Linux to windows out of the box.
This was my only need for it. :slight_smile:


Alan Chen
Digikata LLC
http://digikata.com

I didn’t find that any stranger than using a makefile.

Has anyone gotten this to work with a Tk application of any size that would
be willing to share the .rbc file for it?

-michael

···

On Thursday 29 August 2002 11:13, christopher.j.meisenzahl@citicorp.com wrote:

There is an English readme file included in the archive. It gives you
the steps to install/configure it. Erally straightforward. The only
slightly odd piece is creating a text file that the compiler uses to
determine what files are needed.

++++++++++++++++++++++++++++++++++++++++++
Michael C. Libby x@ichimunki.com
public key: http://www.ichimunki.com/public_key.txt
web site: http://www.ichimunki.com
++++++++++++++++++++++++++++++++++++++++++

Let me know if you find out anything, I’ve been struggling with trying
to get it to include fox. I’m still not completely understanding how
it resolves requires. Either that or I’ve found a bug trying to build
a fxruby application into an exe.

  • alan
···

On Fri, Aug 30, 2002 at 08:14:20AM +0900, michael libby wrote:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Thursday 29 August 2002 11:13, christopher.j.meisenzahl@citicorp.com > wrote:

There is an English readme file included in the archive. It gives you
the steps to install/configure it. Erally straightforward. The only
slightly odd piece is creating a text file that the compiler uses to
determine what files are needed.

I didn’t find that any stranger than using a makefile.

Has anyone gotten this to work with a Tk application of any size that would
be willing to share the .rbc file for it?

-michael


Alan Chen
Digikata LLC
http://digikata.com

To answer my own question, exerb aliases the kernel require to do an
internal search. However, from my initial code review, extensions that
use rb_require end up calling rb_f_require which is just a direct
access of the C function. Exerb builds it’s own version of ruby to
include in the exe anyway, so it could be patched to go to the exerb
require code. But should the patch be applied to ruby itself?

If I wanted to instrument requires and did this:
module Kernel
alias_method :origRequire, :require

def require(lib)
  # log requires to stdout
  puts lib
  origRequire(lib)
end

end

require ‘fox’

I end up missing all the extension calls to rb_require.

  • alan
···

On Fri, Aug 30, 2002 at 08:33:34AM +0900, Alan Chen wrote:

On Fri, Aug 30, 2002 at 08:14:20AM +0900, michael libby wrote:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Thursday 29 August 2002 11:13, christopher.j.meisenzahl@citicorp.com > > wrote:

There is an English readme file included in the archive. It gives you
the steps to install/configure it. Erally straightforward. The only
slightly odd piece is creating a text file that the compiler uses to
determine what files are needed.

I didn’t find that any stranger than using a makefile.

Has anyone gotten this to work with a Tk application of any size that would
be willing to share the .rbc file for it?

-michael

Let me know if you find out anything, I’ve been struggling with trying
to get it to include fox. I’m still not completely understanding how
it resolves requires. Either that or I’ve found a bug trying to build
a fxruby application into an exe.


Alan Chen
Digikata LLC
http://digikata.com

Hi,

···

At Fri, 30 Aug 2002 12:33:11 +0900, Alan Chen wrote:

To answer my own question, exerb aliases the kernel require to do an
internal search. However, from my initial code review, extensions that
use rb_require end up calling rb_f_require which is just a direct
access of the C function. Exerb builds it’s own version of ruby to
include in the exe anyway, so it could be patched to go to the exerb
require code. But should the patch be applied to ruby itself?

The latest CVS exerb patches extension libraries import symbol
table and replaces ‘rb_require’ with ‘rbxrequire’.


Nobu Nakada

Thanks, I’ll try the CVS version.

···

On Fri, Aug 30, 2002 at 04:32:17PM +0900, Nobuyoshi Nakada wrote:

Hi,

At Fri, 30 Aug 2002 12:33:11 +0900, > Alan Chen wrote:

To answer my own question, exerb aliases the kernel require to do an
internal search. However, from my initial code review, extensions that
use rb_require end up calling rb_f_require which is just a direct
access of the C function. Exerb builds it’s own version of ruby to
include in the exe anyway, so it could be patched to go to the exerb
require code. But should the patch be applied to ruby itself?

The latest CVS exerb patches extension libraries import symbol
table and replaces ‘rb_require’ with ‘rbxrequire’.


Nobu Nakada


Alan Chen
Digikata LLC
http://digikata.com