Rubinius Runs Mongrel

Posted by kev Mon, 10 Dec 2007 09:40:00 GMT

Reposted from my message to rubinius-dev. Congrats to the whole Rubinius team. This was entirely a group effort, and one hell of an achievement.

Here's the first Mongrel handler running on Rubinius:

http://pastie.caboo.se/paste/asset/126441/Picture_4.png

From this code:

$:.unshift "/Users/kev/code/mongrel/mongrel-1.1.1/lib"

puts "Requiring mongrel"
require 'mongrel'

class HelloHandler < Mongrel::HttpHandler
 def process(request, response)
   response.start(200) do |head, out|
     head["Content-Type"] = "text/html"
     out.write "Hello World! I'm running on Rubinius!"
   end
 end
end

server = Mongrel::HttpServer.new("0.0.0.0", 3000)
puts "Started Server"
server.register("/hello", HelloHandler.new)
puts "Registered handler"
t = server.run
t.join

***THE CATCH (as this may be viewed by many people)***

This isn't completely complete. rb_global_variable was #define'd out
to do nothing (so no garbage collection on the global vars), and there
was a slight modification from the trunk to make global aliasing
ignore the fact that the globals just weren't there. Mongrel's
http11.c was also _slightly (very very slightly)_ modified to use the
rb_str_get_char_* methods we've decided to move to from RSTRING()->ptr
and RSTRING()->len, and I haven't gotten around to defining ALLOC_N
yet, so it was changed to a simple malloc. That's it though.

And it seems to run. And I feel like I need to run around the block.

It's in 9976301ba.

WOOOOOOOOOOOOOOOOOOOOO!

Posted in  | 4 comments

Comments

  1. Avatar Tim Lucas said about 4 hours later:

    Sweet work. All this Rubinius work is like a little chrissy pressie for us all!

  2. Avatar Ezra said about 10 hours later:

    You so rock Kevin.

  3. Avatar Dr Nic said about 12 hours later:

    Champion work. Now we just need the Turtles < Rubinius < Space Shuttle results and Evan’s RailsConf Europe slides will be validated.

  4. Avatar Tom Mornini said about 22 hours later:

    Terrific work, Kevin.

    Thank you so much for your work on Rubinius!

Comments are disabled