if_mruby: embedded mruby in vim

444 views
Skip to first unread message

mattn

unread,
Jan 31, 2013, 4:24:03 AM1/31/13
to vim...@googlegroups.com
Hi all.

I wrote a patch to add new feature if_mruby to vim.

https://github.com/mruby/mruby

MRuby is the lightweight implementation of the Ruby language.

Most of behavior is same as if_ruby. But, $curwin/$curbuf can't be port to if_mruby. mruby can't define method that the name contains $. So I renamed $curbuf to __curbuf, $curwin to __curwin on if_mruby.

To building if_mruby,

1. build mruby

$ git clone https://github.com/mruby/mruby
$ cd mruby
$ rake

Or if you want to add mrbgems to libmruby.a, modify build_config.rb

2. apply patch to vim

$ curl https://gist.github.com/raw/4662845/vim7-if_mruby.diff | patch -p1
$ export MRUBY_ROOT=/path/to/mruby
$ ./configure --enable-mrubyinterp

MRuby does not support dynamic loading packages. So I made new mrbgem (mruby gem) to solve this problem.

http://github.com/mattn/mruby-require

If you add mruby-require into configuration of mruby, you can use 'require' in your mruby or if_mruby.
You can find many mrbgems on github.

https://github.com/mruby/mruby/wiki/Related-Projects

Also you can use mgem command that is provided as ruby gems. This command can mange mrbgens for your build_config.rb.

https://github.com/bovi/mgem

At the last, patch is here:

https://gist.github.com/4662845

Thanks.

- Yasuhiro Matsumoto

Yasuhiro MATSUMOTO

unread,
Jan 31, 2013, 7:24:45 AM1/31/13
to vim...@googlegroups.com
For MSVC or mingw users,please specify MRUBY=C:/PATH/TO/MRUBY to make argument.
> --
> --
> You received this message from the "vim_dev" maillist.
> Do not top-post! Type your reply below the text you are replying to.
> For more information, visit http://www.vim.org/maillist.php
>
> ---
> You received this message because you are subscribed to the Google Groups
> "vim_dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to vim_dev+u...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>


--
- Yasuhiro Matsumoto
Reply all
Reply to author
Forward
0 new messages