Skip to content

mattn/mruby-require

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
 
 
 
 
 
 
 
 
 
 

mruby-require

Build Status

mruby-require adds require support to mruby. This is based on iij's fork of mruby: https://github.com/iij/mruby

install by mrbgems

MRuby::Build.new do |conf|
  if ENV['OS'] != 'Windows_NT' then
    conf.cc.flags << %w|-fPIC| # needed for using bundled gems
  end
    # ... (snip) ...
  conf.gem :github => 'mattn/mruby-require'
end

To work properly, mruby-require must be the last mrbgem specified in the build configuration. Any mrbgem specified after mruby-require is compiled as a shared object (.so) and put in build/host/lib (full path available in $:). For loading them at runtime, see the next section.

Requiring additional mrbgems

When mruby-require is being used, additional mrbgems that appear after mruby-require in build_config.rb must be required to be used.

For example, if using mruby-onig-regexp, you should add the following to your code:

require 'mruby-onig-regexp'

Requiring mrbgems in defaults

Set MRUBY_REQUIRE environment variable as comma separated values like following

MRUBY_REQUIRE=mruby-onig-regexp,mruby-xquote

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published