Git Product home page Git Product logo

C/C++ CI

PicoRuby

PicoRuby is an alternative mruby implementation which is:

  • Small foot print
    • ROM: 256 KB (depending on build config)
    • RAM: 128 KB or less (depending on app code)
    • (Figures in 32 bit architecture)
  • Portable
    • Depends on only standard C library such as glibc, Newlib or Newlib-nano
  • Reference microcontroller boards
    • Raspberry Pi Pico - Arm Cortex-M0+, 264 KB RAM, 2 MB Flash

API documentation with some demo videos

https://picoruby.github.io/

Depends on

Used by

PRK Firmware

Build

  • Prerequisites
    • C toolchain
    • git
    • ruby (should be CRuby)
  • git clone --recursive this repository
  • cd picoruby
  • rake builds binaries for your machine
    • PicoRuby basically uses mruby's build system as it is
    • rake -T shows available subcommands

Cross compilation

See an example: build_config/r2p2-cortex-m0plus.rb

Binaries

rake command will make three kinds of executable binary

  • bin/picorbc
    • bin/picorbc path/to/source.rb makes path/to/source.mrb that is VM code runs on an mruby-compatible virtual machine
  • bin/picoruby
    • bin/picoruby source.rb executes Ruby just like normal ruby command
    • You can also do like bin/picoruby -e 'puts "Hello World!"'

--verbose option

bin/picoruby --verbose -e 'puts "Hello World!"' shows debug-print like this:

(Replace [path/to/]mmruby with bin/picoruby --verbose in mind. It's an old name)

Roadmap

PicoRuby is still developing halfway towards finishing as of 2024.

See implementation roadmap on issue/6

Contributing to PicoRuby

Fork, patch, then send a pull request.

Acknowledgement

Part of this project was coded by Monstarlab with the support of the Ruby Association Grant Program 2020 and 2021.

See also picoruby/picoruby/wiki.

License

Copyright © 2020-2024 HASUMI Hitoshi. See MIT-LICENSE for further details.

Copyright © 2020-2021 Monstarlab. See MIT-LICENSE for further details.

PicoRuby's Projects

PicoRuby doesn’t have any public repositories yet.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.