2021 Ruby Association Grant selection result
We are very happy to announce that the following four projects have been selected by the Ruby Association grant committee.
Accomplishments of the projects will be published around April 2022.
picoruby-compiler: An alternative mruby-compiler
The PicoRuby compiler adopted for the RA Grant 2020 has achieved great success and has been integrated with mruby/c to become a Ruby interpreter implementation “PicoRuby” for one-chip microcontrollers. On the other hand, the memory-saving performance, which is a feature of the PicoRuby compiler, is considered to be advantageous in integration with mruby. The goal of this project is to reorganize the source code and to prepare necessary APIs so that PicoRuby compiler becomes a module that can be used as an alternative compiler for mruby.
MRI’s WebAssembly support for portable Ruby programs
WebAssembly is not only for porting existing assets to the web browser, but also for providing a secure portable executable. It’s not limited to the web, and is being used in a variety of situations such as edge computing, embedded environments, and interfaces for plug-in systems. The Ruby community has already ported Ruby implementation to WebAssembly using Emscripten, but it depends heavily on the host environment. It makes it difficult to use for the above applications.
This project aims to improve the portability of Ruby programs by making it possible to compile MRI into standalone WebAssembly. Furthermore, it aims to package a Ruby program into a single WebAssembly binary to make distribution easily.
Improvement of usability and development efficiency in “debug.gem”
We will improve the quality of “debug.gem” from two approaches. Our first approach is implementation of a debugging function with Google Chrome. When we try to show a backtrace such as multidimensional arrays or multi variables in the terminal, it becomes complicated and difficult to see them.Hence, we will make backtrace information easy to see by debugging the program via Chrome. This function has already been introduced as a prototype, and we will continue to improve it. Secondly, we’ll develop the test framework. There are two external tools that can be used in “debug.gem”, VSCode and Chrome, and the server which sends the protocol is implemented. However, we have to manually check the impact on other functions during development because there are no test frameworks for them now. We’ll improve the developer’s productivity by creating test frameworks.
Description: Ruby formatter is a reimplementation of the prettier plugin for Ruby written in pure Ruby. It will provide an executable that can be used to format Ruby files from the command line. It will also provide a language server that can be used to integrate with editors to enable format-on-save functionality. Its implementation will be based on both the ripper and prettyprint gems, with additional functionality being added to both.