A cross-platform MRuby port of the core system libraries from CRuby:
mruby-apr
specs are here.1. Setup the dependencies
mruby-apr
here.spec.cc.flags << '-DMRB_INT64'
conf.gem 'path/to/mruby-apr'
2. Make & Rake
cd /path/to/apr
configure && make && sudo make install
cd /path/to/mruby
rake
_Note: APR uses the off64_t type. If you're running 32-bit Linux and get errors like "Unknown type name off64_t"
you'll need to define the preprocessor macro _LARGEFILE64_SOURCE
._
1. Setup the dependencies
mruby-apr
here.spec.cc.flags << '-DMRB_INT64'
ENV['APR_HOME'] = "/path/to/your/libapr/build/dir"
conf.gem '/path/to/mruby-apr'
Notice that on windows, you must set APR_HOME to tell this gem where to find headers & lib files
2. CMake & Rake
APR comes with cmake
scripts. You can use cmake
to generate different kinds of project files for building APR.
To name a few, Visual Studio, MinGW, and NMake are supported. Just use the same compiler you're using for MRuby.
Once APR is built
cd /path/to/mruby
rake
Primary development and testing done on Windows, Mac, Ubuntu, and Raspbian. However, it should work anywhere you can compile Apache APR.
Apache APR provides a cross platform runtime library for C, allowing portable access to system resources
(eg processes, files, sockets, etc.). mruby-apr
provides bindings to this library to bring these capabilities
to mruby, without having to code the cross-platform logic over again.
These bindings are provided at 2 distinct levels:
APR
module.