Code Monkey home page Code Monkey logo

ironrubyembeddedapps's Introduction

IronRubyEmbeddedApps

(More detail on the Wiki pages)

This repository shows how to create standalone .Net applications written in Ruby.

You can package up Ruby applications as ordinary .Net executables without having to ship a collection of plain-text Ruby source files and the associated standard Ruby libraries.

If you want proof, look at the single file IRSinatra.exe which demonstrates a fully operational Sinatra example program. It needs no other files – you just need the IronRuby runtime DLLs to be available on the PC.

Your source Ruby files are embedded directly into your executable, and you can use require, load, File.open etc just as if the files were on disk.

No-one need ever know… (including your IT department).

Example:

  EmbeddedRuby er = new EmbeddedRuby();
  er.Mount("Applications");
  exitcode = er1.Run("main.rb");

How

To create an Embedded Ruby application, you just need the following components:

IronRuby

IronRuby is the Open Source version of Ruby for .Net

Serfs

Serfs is a “Simple Embedded Resource File System” for .Net. It provides access to files embedded in .Net assemblies. Files can be encoded for privacy.

IREmbeddedApp

IREmbeddedApp provides a wrapper for IronRuby and Serfs, and a bootstrapper that patches the appropriate Ruby methods so that they can read files from embedded resources.

Repository contents

This repository contains the following parts

  1. IREmbeddedApp : The core IREmbeddedApp dll.
  2. ExampleApps : An example command-line program showing how to run Ruby programs.
  3. IREmbeddedLibraries : A DLL containing a copy of the standard Ruby 1.8 libraries (including rubygems, rexml etc), plus rack-1.1.0 and sinatra-1.0. This can be optionally included in an application if you need library support.
  4. IRSinatra : A fully working Sinatra application with 2 flavours, one with libraries in individual DLLs, one with them all merged into the .exe
  5. IRTestResources : An example DLL containing no code, just embedded resources (optparse, test::unit and flexmock taken directly from an ordinary Ruby install).

License

Copyright © 2010 David Lake (rifraf → rifraf.net)

Released under the MIT license. See LICENSE file for details.

ironrubyembeddedapps's People

Contributors

rifraf avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.