mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Merge pull request #2595 from drbrain/80_column_README
Wrap README, etc. to 80 columns
This commit is contained in:
+7
-5
@@ -14,7 +14,8 @@ things in mind before submitting your pull request:
|
||||
* Don't mix several features or bug-fixes in one pull request
|
||||
* Create a meaningful commit message
|
||||
* Explain your change (i.e. with a link to the issue you are fixing)
|
||||
* Use mrbgem to provide non ISO features (classes, modules and methods) unless you have a special reason to implement them in the core
|
||||
* Use mrbgem to provide non ISO features (classes, modules and methods) unless
|
||||
you have a special reason to implement them in the core
|
||||
|
||||
## Coding conventions
|
||||
|
||||
@@ -32,8 +33,9 @@ mruby should be highly portable to other systems and compilers. For this it is
|
||||
recommended to keep your code as close as possible to the C99 standard
|
||||
(http://www.open-std.org/jtc1/sc22/WG14/www/docs/n1256.pdf).
|
||||
|
||||
Although we target C99, Visual C++ is also an important target for mruby. For this
|
||||
reason a declaration of a local variable has to be at the beginning of a scope block.
|
||||
Although we target C99, Visual C++ is also an important target for mruby. For
|
||||
this reason a declaration of a local variable has to be at the beginning of a
|
||||
scope block.
|
||||
|
||||
#### Reduce library dependencies to a minimum
|
||||
|
||||
@@ -57,8 +59,8 @@ Use C++ style comments only for temporary comment e.g. commenting out some code
|
||||
|
||||
### Ruby code
|
||||
|
||||
Parts of the standard library of mruby are written in the Ruby programming language
|
||||
itself. Please note the following hints for your Ruby code:
|
||||
Parts of the standard library of mruby are written in the Ruby programming
|
||||
language itself. Please note the following hints for your Ruby code:
|
||||
|
||||
#### Comply with the Ruby standard (ISO/IEC 30170:2012)
|
||||
|
||||
|
||||
@@ -1,27 +1,30 @@
|
||||
* Prerequisites
|
||||
|
||||
1. Make sure you have bison (http://www.gnu.org/software/bison/) installed in your system.
|
||||
1. Make sure you have bison (http://www.gnu.org/software/bison/) installed in
|
||||
your system.
|
||||
2. Make sure you have ruby installed in your system (required to build).
|
||||
|
||||
|
||||
* Compilation and Installation
|
||||
|
||||
1. Run make in the top directory.
|
||||
|
||||
This command will create a build directory with a directory for the host environment
|
||||
and one for each crossbuild environment based on the settings in the build_config.rb
|
||||
file.
|
||||
This command will create a build directory with a directory for the host
|
||||
environment and one for each crossbuild environment based on the settings
|
||||
in the build_config.rb file.
|
||||
|
||||
Assuming a default build, each of the environment directories will have the following
|
||||
important directories:
|
||||
Assuming a default build, each of the environment directories will have
|
||||
the following important directories:
|
||||
|
||||
* bin - The binary executables for this environment
|
||||
* lib - The libraries for this environment
|
||||
|
||||
You can find the header files in the include directory at the root of the project.
|
||||
You can find the header files in the include directory at the root of the
|
||||
project.
|
||||
|
||||
You can directly invoke 'minirake' with the following command:
|
||||
|
||||
$ ruby ./minirake
|
||||
$ ruby ./minirake
|
||||
|
||||
If an error occurs when compiling mruby, it will be helpful for others if you
|
||||
send a detailed report to the developers that includes the error log, machine,
|
||||
@@ -30,19 +33,19 @@ and OS type.
|
||||
|
||||
* Adding existing gems
|
||||
|
||||
Gems from the [list of mruby gems](http://www.mruby.org/libraries/) can be added by adding
|
||||
their respective GitHub URLs to build_config.rb. For example, to add implementations of the
|
||||
File and IO Ruby core classes to mruby, insert the following in build_config.rb under the
|
||||
comment section `Use mrbgems`:
|
||||
Gems from the [list of mruby gems](http://www.mruby.org/libraries/) can be
|
||||
added by adding their respective GitHub URLs to build_config.rb. For example,
|
||||
to add implementations of the File and IO Ruby core classes to mruby, insert
|
||||
the following in build_config.rb under the comment section `Use mrbgems`:
|
||||
|
||||
conf.gem :git => 'git@github.com:iij/mruby-io.git', :branch => 'master'
|
||||
|
||||
Afterwards, re-run:
|
||||
Afterwards, re-run:
|
||||
|
||||
ruby ./minirake
|
||||
ruby ./minirake
|
||||
|
||||
|
||||
* Porting to other platforms
|
||||
|
||||
|
||||
That's all.
|
||||
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
[](https://travis-ci.org/mruby/mruby)
|
||||
[![Build Status][build-status-img]][travis-ci]
|
||||
|
||||
## What's mruby
|
||||
|
||||
mruby is the lightweight implementation of the Ruby language complying to (part of)
|
||||
the [ISO standard](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=59579).
|
||||
Its syntax is Ruby 1.9 compatible.
|
||||
mruby is the lightweight implementation of the Ruby language complying to (part
|
||||
of) the [ISO standard][ISO-standard]. Its syntax is Ruby 1.9 compatible.
|
||||
|
||||
mruby can be linked and embedded within your application. We provide the interpreter program "mruby" and
|
||||
the interactive mruby shell "mirb" as examples. You can also compile Ruby programs into compiled byte code
|
||||
using the mruby compiler "mrbc". All those tools reside in the "bin" directory. "mrbc" is also able to
|
||||
generate compiled byte code in a C source file, see the "mrbtest" program under the "test" directory
|
||||
for an example.
|
||||
mruby can be linked and embedded within your application. We provide the
|
||||
interpreter program "mruby" and the interactive mruby shell "mirb" as examples.
|
||||
You can also compile Ruby programs into compiled byte code using the mruby
|
||||
compiler "mrbc". All those tools reside in the "bin" directory. "mrbc" is
|
||||
also able to generate compiled byte code in a C source file, see the "mrbtest"
|
||||
program under the "test" directory for an example.
|
||||
|
||||
This achievement was sponsored by the Regional Innovation Creation R&D Programs of
|
||||
the Ministry of Economy, Trade and Industry of Japan.
|
||||
This achievement was sponsored by the Regional Innovation Creation R&D Programs
|
||||
of the Ministry of Economy, Trade and Industry of Japan.
|
||||
|
||||
|
||||
## How to get mruby
|
||||
@@ -48,6 +48,7 @@ To subscribe to the mruby mailing list....[T.B.D.]
|
||||
|
||||
See the INSTALL file.
|
||||
|
||||
|
||||
## Running Tests
|
||||
|
||||
To run the tests, execute the following from the project's root directory.
|
||||
@@ -58,12 +59,14 @@ Or
|
||||
|
||||
$ ruby ./minirake test
|
||||
|
||||
|
||||
## Customization
|
||||
|
||||
mruby contains a package manager called *mrbgems*. To create extensions
|
||||
in C and/or Ruby you should create a *GEM*. You will find a complete
|
||||
documentation with examples under *examples/mrbgems*.
|
||||
|
||||
|
||||
## License
|
||||
|
||||
Copyright (c) 2014 mruby developers
|
||||
@@ -86,26 +89,35 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
DEALINGS IN THE SOFTWARE.
|
||||
|
||||
|
||||
## Note for License
|
||||
|
||||
mruby has chosen a MIT License due to its permissive license allowing
|
||||
developers to target various environments such as embedded systems.
|
||||
However, the license requires the display of the copyright notice and license
|
||||
information in manuals for instance. Doing so for big projects can be
|
||||
complicated or troublesome.
|
||||
This is why mruby has decided to display "mruby developers" as the copyright name
|
||||
to make it simple conventionally.
|
||||
complicated or troublesome. This is why mruby has decided to display "mruby
|
||||
developers" as the copyright name to make it simple conventionally.
|
||||
In the future, mruby might ask you to distribute your new code
|
||||
(that you will commit,) under the MIT License as a member of
|
||||
"mruby developers" but contributors will keep their copyright.
|
||||
(We did not intend for contributors to transfer or waive their copyrights,
|
||||
Actual copyright holder name (contributors) will be listed in the AUTHORS file.)
|
||||
Actual copyright holder name (contributors) will be listed in the AUTHORS
|
||||
file.)
|
||||
|
||||
Please ask us if you want to distribute your code under another license.
|
||||
|
||||
|
||||
## How to Contribute
|
||||
|
||||
See the [contribution guidelines](https://github.com/mruby/mruby/blob/master/CONTRIBUTING.md)
|
||||
then send a pull request to <http://github.com/mruby/mruby>. We consider you have granted
|
||||
non-exclusive right to your contributed code under MIT license. If you want to be named
|
||||
as one of mruby developers, please include an update to the AUTHORS file in your pull request.
|
||||
See the [contribution guidelines][contribution-guidelines] then send a pull
|
||||
request to <http://github.com/mruby/mruby>. We consider you have granted
|
||||
non-exclusive right to your contributed code under MIT license. If you want to
|
||||
be named as one of mruby developers, please include an update to the AUTHORS
|
||||
file in your pull request.
|
||||
|
||||
[ISO-standard]: http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=59579
|
||||
[build-status-img]: https://travis-ci.org/mruby/mruby.png?branch=master
|
||||
[contribution-guidelines]: https://github.com/mruby/mruby/blob/master/CONTRIBUTING.md
|
||||
[travis-ci]: https://travis-ci.org/mruby/mruby
|
||||
|
||||
|
||||
Reference in New Issue
Block a user