Skip to content
Michael edited this page Jul 3, 2016 · 6 revisions

Welcome to the mruby-cli wiki!

gem install mgem
mruby-cli --setup mruby_app
cd mruby_app
mgem update
mgem list
for i in `echo "mruby-io mruby-pack mruby-socket mruby-http mruby-simplehttpserver"`; do mgem add $i; done
mgem list active
def gem_config(conf)
  conf.gembox 'full-core'
  # user-defined GEMs
  conf.gem :git => 'https://github.com/gromnitsky/mruby-dir-glob.git'
  conf.gem :git => 'https://github.com/iij/mruby-dir.git'
  conf.gem :git => 'https://github.com/mattn/mruby-http.git'
  conf.gem :git => 'https://github.com/iij/mruby-io.git'
  conf.gem :git => 'https://github.com/iij/mruby-pack.git'
  conf.gem :git => 'https://github.com/iij/mruby-socket.git'
  conf.gem :git => 'https://github.com/matsumoto-r/mruby-simplehttpserver.git'

  # be sure to include this gem (the cli app)
  conf.gem File.expand_path(File.dirname(__FILE__))
end

MRuby::Build.new do |conf|
  toolchain :clang

  conf.enable_bintest
  conf.enable_debug
  conf.enable_test

  gem_config(conf)
end

MRuby::CrossBuild.new('x86_64-apple-darwin14') do |conf|
  toolchain :clang

  [conf.cc, conf.linker].each do |cc|
    cc.command = 'x86_64-apple-darwin14-clang'
  end
  conf.cxx.command      = 'x86_64-apple-darwin14-clang++'
  conf.archiver.command = 'x86_64-apple-darwin14-ar'

  conf.build_target     = 'x86_64-pc-linux-gnu'
  conf.host_target      = 'x86_64-apple-darwin14'

  gem_config(conf)
end
docker-compose run compile

Clone this wiki locally