Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c16c1d9
commit e90eac1
Showing
7 changed files
with
130 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ test.c | |
test.wasm | ||
test.js | ||
|
||
node_modules/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[submodule "emsdk"] | ||
path = emsdk | ||
url = https://github.com/emscripten-core/emsdk.git | ||
[submodule "mruby"] | ||
path = mruby | ||
url = https://github.com/mruby/mruby.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Submodule mruby
updated
24 files
+1 −1 | README.md | |
+1 −1 | doc/guides/debugger.md | |
+9 −9 | doc/limitations.md | |
+2 −1 | include/mruby.h | |
+2 −2 | include/mruby/compile.h | |
+2 −3 | include/mruby/debug.h | |
+4 −4 | include/mruby/version.h | |
+9 −7 | mrbgems/mruby-bin-debugger/tools/mrdb/apibreak.c | |
+1 −1 | mrbgems/mruby-bin-debugger/tools/mrdb/apilist.c | |
+3 −3 | mrbgems/mruby-bin-debugger/tools/mrdb/cmdbreak.c | |
+2 −2 | mrbgems/mruby-bin-debugger/tools/mrdb/mrdb.c | |
+14 −11 | mrbgems/mruby-compiler/core/codegen.c | |
+11 −9 | mrbgems/mruby-compiler/core/parse.y | |
+3 −10 | mrbgems/mruby-math/src/math.c | |
+31 −51 | mrbgems/mruby-math/test/math.rb | |
+4 −4 | mrbgems/mruby-proc-ext/src/proc.c | |
+4 −4 | src/backtrace.c | |
+3 −11 | src/class.c | |
+7 −7 | src/codedump.c | |
+7 −8 | src/debug.c | |
+2 −2 | src/error.c | |
+0 −3 | src/load.c | |
+28 −19 | src/symbol.c | |
+17 −9 | test/assert.rb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,114 @@ | ||
diff --git a/build_config.rb b/build_config.rb | ||
index 751317c7..9d84f761 100644 | ||
--- a/build_config.rb | ||
+++ b/build_config.rb | ||
@@ -125,6 +125,15 @@ MRuby::Build.new('test') do |conf| | ||
conf.gembox 'default' | ||
end | ||
|
||
+MRuby::CrossBuild.new('emscripten') do |conf| | ||
+ toolchain :clang | ||
+ conf.gembox 'wasm' | ||
+ conf.cc.command = 'emcc' | ||
+ conf.cc.flags = %W(-Os) | ||
+ conf.linker.command = 'emcc' | ||
+ conf.archiver.command = 'emar' | ||
+end | ||
+ | ||
#MRuby::Build.new('bench') do |conf| | ||
# # Gets set by the VS command prompts. | ||
# if ENV['VisualStudioVersion'] || ENV['VSINSTALLDIR'] | ||
diff --git a/mrbgems/wasm.gembox b/mrbgems/wasm.gembox | ||
new file mode 100644 | ||
index 00000000..4aa8f0d2 | ||
--- /dev/null | ||
+++ b/mrbgems/wasm.gembox | ||
@@ -0,0 +1,88 @@ | ||
+MRuby::GemBox.new do |conf| | ||
+ # Meta-programming features | ||
+ conf.gem :core => "mruby-metaprog" | ||
+ | ||
+ # Use standard Array#pack, String#unpack methods | ||
+ conf.gem :core => "mruby-pack" | ||
+ | ||
+ # Use standard Kernel#sprintf method | ||
+ conf.gem :core => "mruby-sprintf" | ||
+ | ||
+ # Use standard print/puts/p | ||
+ conf.gem :core => "mruby-print" | ||
+ | ||
+ # Use standard Math module | ||
+ conf.gem :core => "mruby-math" | ||
+ | ||
+ # Use standard Time class | ||
+ conf.gem :core => "mruby-time" | ||
+ | ||
+ # Use standard Struct class | ||
+ conf.gem :core => "mruby-struct" | ||
+ | ||
+ # Use Comparable module extension | ||
+ conf.gem :core => "mruby-compar-ext" | ||
+ | ||
+ # Use Enumerable module extension | ||
+ conf.gem :core => "mruby-enum-ext" | ||
+ | ||
+ # Use String class extension | ||
+ conf.gem :core => "mruby-string-ext" | ||
+ | ||
+ # Use Numeric class extension | ||
+ conf.gem :core => "mruby-numeric-ext" | ||
+ | ||
+ # Use Array class extension | ||
+ conf.gem :core => "mruby-array-ext" | ||
+ | ||
+ # Use Hash class extension | ||
+ conf.gem :core => "mruby-hash-ext" | ||
+ | ||
+ # Use Range class extension | ||
+ conf.gem :core => "mruby-range-ext" | ||
+ | ||
+ # Use Proc class extension | ||
+ conf.gem :core => "mruby-proc-ext" | ||
+ | ||
+ # Use Symbol class extension | ||
+ conf.gem :core => "mruby-symbol-ext" | ||
+ | ||
+ # Use Random class | ||
+ conf.gem :core => "mruby-random" | ||
+ | ||
+ # Use Object class extension | ||
+ conf.gem :core => "mruby-object-ext" | ||
+ | ||
+ # Use ObjectSpace class | ||
+ conf.gem :core => "mruby-objectspace" | ||
+ | ||
+ # Use Fiber class | ||
+ conf.gem :core => "mruby-fiber" | ||
+ | ||
+ # Use Enumerator class (require mruby-fiber) | ||
+ conf.gem :core => "mruby-enumerator" | ||
+ | ||
+ # Use Enumerator::Lazy class (require mruby-enumerator) | ||
+ conf.gem :core => "mruby-enum-lazy" | ||
+ | ||
+ # Use toplevel object (main) methods extension | ||
+ conf.gem :core => "mruby-toplevel-ext" | ||
+ | ||
+ # Generate mirb command | ||
+ conf.gem :core => "mruby-bin-mirb" | ||
+ | ||
+ # Generate mruby command | ||
+ conf.gem :core => "mruby-bin-mruby" | ||
+ | ||
+ # Generate mruby-strip command | ||
+ conf.gem :core => "mruby-bin-strip" | ||
+ | ||
+ # Use Kernel module extension | ||
+ conf.gem :core => "mruby-kernel-ext" | ||
+ | ||
+ # Use class/module extension | ||
+ conf.gem :core => "mruby-class-ext" | ||
+ | ||
+ # Use mruby-compiler to build other mrbgems | ||
+ conf.gem :core => "mruby-compiler" | ||
+end |