Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mruby
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
mruby
Commits
4e5315ff
Commit
4e5315ff
authored
Jun 10, 2014
by
Masaki Muranaka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add more info about "include_paths and GEM dependency".
parent
7b6150ab
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
4 deletions
+19
-4
doc/mrbgems/README.md
doc/mrbgems/README.md
+19
-4
No files found.
doc/mrbgems/README.md
View file @
4e5315ff
...
...
@@ -75,6 +75,8 @@ contains every gem found in the *mrbgems* directory.
The maximal GEM structure looks like this:
+- GEM_NAME <- Name of GEM
|
+- include/ <- Header for Ruby extension (will exported)
|
+- mrblib/ <- Source for Ruby extension
|
...
...
@@ -87,10 +89,10 @@ The maximal GEM structure looks like this:
+- README.md <- Readme for GEM
The folder
*mrblib*
contains pure Ruby files to extend mruby. The folder
*src*
contains C
files to extend mruby. The folder
*test*
contains C and pure Ruby files
f
or testing purposes which will be used by
`mrbtest`
.
*mrbgem.rake*
contain
s
the specification to compile C and Ruby files.
*README.md*
is a short descrip
tion
of your GEM.
contains C
/C++ files to extend mruby. The folder
*include*
contains C/C++ header
f
iles. The folder
*test*
contains C/C++ and pure Ruby files for testing purpose
s
which will be used by
`mrbtest`
.
*mrbgem.rake*
contains the specifica
tion
to compile C and Ruby files.
*README.md*
is a short description
of your GEM.
## Build process
...
...
@@ -173,6 +175,19 @@ the following options additionally inside of your GEM specification:
*
`spec.test_objs`
(Object test files for integration into mrbtest)
*
`spec.test_preload`
(Initialization files for mrbtest)
### include_paths and depencency
Your GEM can export include paths to another GEMs that depends on your GEM.
By default,
`/...absolute path.../{GEM_NAME}/include`
will be exported.
So it is recommended not to put GEM's local header files on include/.
These exports are retroactive.
For example: when B depends to C and A depends to B, A will get include paths exported by C.
Exported include_paths are automatically appended to GEM local include_paths by Minirake.
You can use
`spec.export_include_paths`
accessor if you want more complex build.
## C Extension
mruby can be extended with C. This is possible by using the C API to
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment