Precompiling Ruby programs

J

John Wells

Guys,

We're considering Ruby here at work for a web application we would resell
to customers.

We're currently a Java shop, so distributing code in binary form (via
class files) is no problem. We get a few benefits: performance benefits
and IP protection (via bytecode obfuscation).

Is there any way to precompile ruby programs? How have you handled
similar scenarios? This is unfortunately a stopping point for us, as we
can't comfortably distribute our readable code to clients.

I appreciate any insight you can provide.

John
 
D

David Mitchell

We have an internal tool with a lot of dependencies: wxRuby, SSL
libraries etc, but the guys that use it don't want to stuff around
installing all that on their machine to use our tool so we package it
all up into an exe with exerb (http://exerb.sourceforge.jp/index.en.html)

Works really well. The resulting executable is fairly large, but it
works perfectly, performance is fine (hard to tell with our app, because
it's not very cpu intensive).

HTH

David

John said:
Guys,

We're considering Ruby here at work for a web application we would resell
to customers.

We're currently a Java shop, so distributing code in binary form (via
class files) is no problem. We get a few benefits: performance benefits
and IP protection (via bytecode obfuscation).

Is there any way to precompile ruby programs? How have you handled
similar scenarios? This is unfortunately a stopping point for us, as we
can't comfortably distribute our readable code to clients.

I appreciate any insight you can provide.

John


--
David Mitchell
Software Engineer
Telogis

NOTICE:
This message (including any attachments) contains CONFIDENTIAL
INFORMATION intended for a specific individual and purpose, and
is protected by law. If you are not the intended recipient,
you should delete this message and are hereby notified that any
disclosure, copying, or distribution of this message, or the
taking of any action based on it, is strictly prohibited.
 
D

David Mitchell

One problem, just realised the ruby source is stored verbatim inside the
executable, so this might not be your best bet. However, seaching for
"build ruby exe windows" on google turns up a few other candidates.

David

David said:
We have an internal tool with a lot of dependencies: wxRuby, SSL
libraries etc, but the guys that use it don't want to stuff around
installing all that on their machine to use our tool so we package it
all up into an exe with exerb (http://exerb.sourceforge.jp/index.en.html)

Works really well. The resulting executable is fairly large, but it
works perfectly, performance is fine (hard to tell with our app, because
it's not very cpu intensive).

HTH

David


--
David Mitchell
Software Engineer
Telogis

NOTICE:
This message (including any attachments) contains CONFIDENTIAL
INFORMATION intended for a specific individual and purpose, and
is protected by law. If you are not the intended recipient,
you should delete this message and are hereby notified that any
disclosure, copying, or distribution of this message, or the
taking of any action based on it, is strictly prohibited.
 
A

Ara.T.Howard

We're considering Ruby here at work for a web application we would resell to
customers.

We're currently a Java shop, so distributing code in binary form (via class
files) is no problem. We get a few benefits: performance benefits and IP
protection (via bytecode obfuscation).

Is there any way to precompile ruby programs? How have you handled similar
scenarios? This is unfortunately a stopping point for us, as we can't
comfortably distribute our readable code to clients.

I appreciate any insight you can provide.

this doesn't make me feel too comfortable

http://www.google.com/search?hl=en&q=decompile+java&btnG=Google+Search

in particular

"It turns out, due to a quirk in the design of the Java Runtime system and
the relationship with its compilers, that Java code can be almost entirely
reconstructed, including the actual names of variables used by the original
programmer! The only things missing are the comments. This is an amazing
oversight in the architecture of Java. Why is it this way? I don't know. I'd
be interested in hearing more."

from

http://davenet.scripting.com/1997/02/19/DecompilingJava

dated - but food for thought.

cheers.

-a
--
===============================================================================
| email :: ara [dot] t [dot] howard [at] noaa [dot] gov
| phone :: 303.497.6469
| although gold dust is precious, when it gets in your eyes, it obstructs
| your vision. --hsi-tang
===============================================================================
 
M

Mark Hubbart

With nodewrap, you can store the code as an AST: [...]
The process is still somewhat reversible, but afaik no one has written a
tool yet to do this.

I should also note that the code is still experimental, and you should test
your code thoroughly after transforming it this way.

Looks cool! The url, for the google-impaired:
http://rubystuff.org/nodewrap/

cheers,
Mark
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,171
Messages
2,570,935
Members
47,472
Latest member
KarissaBor

Latest Threads

Top