-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] Support mruby 1.4.1 #99
base: master
Are you sure you want to change the base?
Conversation
@@ -126,8 +126,10 @@ void mrb_ext_set_instance_tt(struct RClass* class, enum mrb_vtype type) { | |||
MRB_SET_INSTANCE_TT(class, type); | |||
} | |||
|
|||
int mrb_ext_ary_len(struct mrb_state* mrb, mrb_value array) { | |||
return mrb_ary_len(mrb, array); | |||
long long mrb_ext_ary_len(struct mrb_state* mrb, mrb_value array) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function has been dropped in favour of RARRAY_LEN
@@ -35,6 +36,9 @@ mkdir -p mruby-out/src/mrbgems | |||
|
|||
cd mruby-$VERSION | |||
|
|||
# Use only supported gems. | |||
cat $DIR/mrusty.gembox > mrbgems/default.gembox |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needed for minirake
not to create _init
/ _final
functions for mruby-io
and mruby-bin*
.
# Copies all gems. | ||
|
||
cp -R mrbgems/* ../mruby-out/src/mrbgems | ||
cp -R build/host/mrbgems/* ../mruby-out/src/mrbgems | ||
|
||
# String needs additional mruby header. | ||
|
||
sed -i -e $'s/#include "common.h"/#include "mruby.h"\\\n#include "common.h"/g' include/mruby/string.h |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Strange thing, string.h
causes dozen undefined type
errors without it.
|
||
# Copies header files so they will be available in top level includes. | ||
|
||
find include/mruby -type f -name '*.h' -exec cp {} ../mruby-out/include \; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mruby-pack
has includes in form of header.h
instead of mruby/header.h
.
# Copies ext header files required by gems. | ||
|
||
mkdir -p ../mruby-out/include/mruby/ext | ||
find mrbgems -path '*/ext/*' -name '*.h' -exec cp {} ../mruby-out/include/mruby/ext \; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently, copies only ext/io.h
.
@@ -0,0 +1,88 @@ | |||
MRuby::GemBox.new do |conf| | |||
# Use standard IO/File class | |||
# conf.gem :core => "mruby-io" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one was problematic.
Rust crates one binary that runs all the tests. I would suggest isolating this to one specific test first so that you know exactly where the segmentation fault is caused. |
In relation to issue: #98 I've also wanted to upgrade to mruby 1.4.1. Applying few hacks (I just wanted to make it run first, then think about doing things properly).
I managed to make mrusty compile but
cargo test
fails@dragostis I know you don't want to spent much time maintaining mrusty anymore but perhaps you can help me with some advice? I don't have much experience with Rust and even less with Ruby.