Hacker News new | ask | show | jobs
by aantix 3769 days ago
Still waiting on Ruby support...
1 comments

It requires a little boilerplate but jruby works well and is reasonably performant if you precompile the ruby:

  require 'java'

  java_import 'com.amazonaws.services.lambda.runtime.Context'
  java_import 'java.util.Map'
   
  class Main
    java_signature 'static String handler(Map<String,String> args, Context context)'
    def self.handler(args, context)
      puts "hello world"
    end
  end

  # jrubyc --java main.rb