mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Merge pull request #1797 from take-cheeze/doc_update
Add notes about new features.
This commit is contained in:
+48
-1
@@ -155,7 +155,7 @@ Configuration of the GPerf binary and flags.
|
||||
|
||||
### File Extensions
|
||||
|
||||
conf.exts do |exts
|
||||
conf.exts do |exts|
|
||||
exts.object = ...
|
||||
exts.executable = ...
|
||||
exts.library = ...
|
||||
@@ -183,6 +183,39 @@ If you want mrbtest.a only, You should set ```conf.build_mrbtest_lib_only```
|
||||
|
||||
conf.build_mrbtest_lib_only
|
||||
|
||||
### Bintest
|
||||
|
||||
Tests for mrbgem tools using CRuby.
|
||||
To have bintests place *.rb scripts to ```bintest/``` directory of mrbgems.
|
||||
See ```mruby-bin-*/bintest/*.rb``` if you need examples.
|
||||
If you want a temporary files use `tempfile` module of CRuby instead of ```/tmp/```.
|
||||
|
||||
You can enable it with following:
|
||||
|
||||
conf.enable_bintest = true
|
||||
|
||||
### C++ ABI
|
||||
|
||||
mruby can use C++ exception to raise exception internally.
|
||||
It is called C++ ABI mode.
|
||||
By using C++ exception it can release C++ stack object correctly.
|
||||
Whenever you mix C++ code C++ ABI mode would be enabled automatically.
|
||||
If you need to enable C++ ABI mode explicity add the following:
|
||||
|
||||
conf.enable_cxx_abi
|
||||
|
||||
### Debugging mode
|
||||
|
||||
To enable debugging mode add the following:
|
||||
|
||||
conf.enable_debug
|
||||
|
||||
When debugging mode is enabled
|
||||
* Macro ```MRB_DEBUG``` would be defined.
|
||||
* Which means ```mrb_assert()``` macro is enabled.
|
||||
* Debug information of irep would be generated by ```mrbc```.
|
||||
* Because ```-g``` flag would be added to ```mrbc``` runner.
|
||||
* You can have better backtrace of mruby scripts with this.
|
||||
|
||||
## Cross-Compilation
|
||||
|
||||
@@ -202,6 +235,20 @@ like this:
|
||||
All configuration options of ```MRuby::Build``` can also be used
|
||||
in ```MRuby::CrossBuild```.
|
||||
|
||||
### Mrbtest in Cross-Compilation
|
||||
|
||||
In cross compilation, you can run ```mrbtest``` on emulator if
|
||||
you have it by changing configuration of test runner.
|
||||
|
||||
conf.test_runner do |t|
|
||||
t.command = ... # set emulator. this value must be non nil or false
|
||||
t.flags = ... # set flags of emulator
|
||||
|
||||
def t.run(bin) # override `run` if you need to change the behavior of it
|
||||
... # `bin` is the full path of mrbtest
|
||||
end
|
||||
end
|
||||
|
||||
## Build process
|
||||
|
||||
During the build process the directory *build* will be created in the
|
||||
|
||||
Reference in New Issue
Block a user