{"id":19489635,"url":"https://github.com/chadowo/mruby-examples","last_synced_at":"2026-04-30T02:36:49.772Z","repository":{"id":187947387,"uuid":"677848494","full_name":"chadowo/mruby-examples","owner":"chadowo","description":"Collection of sample MRuby programs","archived":false,"fork":false,"pushed_at":"2026-02-24T04:26:44.000Z","size":106,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-24T10:29:08.126Z","etag":null,"topics":["c","example-code","examples","mruby","ruby","sample-code","samples"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chadowo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-08-12T20:58:18.000Z","updated_at":"2026-02-24T04:26:48.000Z","dependencies_parsed_at":"2024-08-15T02:45:36.055Z","dependency_job_id":"a62b4c62-282c-47aa-9425-7d82b4eaef4e","html_url":"https://github.com/chadowo/mruby-examples","commit_stats":null,"previous_names":["chadowo/mruby-examples"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/chadowo/mruby-examples","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chadowo%2Fmruby-examples","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chadowo%2Fmruby-examples/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chadowo%2Fmruby-examples/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chadowo%2Fmruby-examples/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chadowo","download_url":"https://codeload.github.com/chadowo/mruby-examples/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chadowo%2Fmruby-examples/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32452741,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T22:27:22.272Z","status":"online","status_checked_at":"2026-04-30T02:00:05.929Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c","example-code","examples","mruby","ruby","sample-code","samples"],"created_at":"2024-11-10T21:09:24.785Z","updated_at":"2026-04-30T02:36:49.767Z","avatar_url":"https://github.com/chadowo.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MRuby Examples\n\n![C](https://img.shields.io/badge/c-%2300599C.svg?style=for-the-badge\u0026logo=c\u0026logoColor=white)\n\nCollection of sample [MRuby](https://mruby.org/) programs.\n\n## Build\n\n### Get MRuby\n\nMake sure you've got MRuby installed, see [here](https://github.com/mruby/mruby#how-to-get-mruby).\n\n\u003e [!TIP]\n\u003e If you are on Linux chances are MRuby is already in the package repositories of your favorite distro! then you'll need to use your distro specific package manager to install it. E.g:\n\nAPT:  \n```console\nsudo apt install libmruby-dev\n```\n\nDNF:  \n```console\nsudo dnf install mruby-devel\n```\n\nPacman:  \n```console\nsudo pacman -S mruby\n```\n\n### Other requirements\n\nSome examples require SDL2. Install it:\n```console\n$ sudo apt install libsdl2-dev\n```\n\nor \n\n```\n$ sudo dnf install SDL2-devel\n```\n\n### Compiling\n\nUse the followings commands:\n\n```console\ncmake -S . -B build\ncmake --build build\n```\n\n## Summary\n\nExamples included here:\n\n### Basic\n\n| Example                                       | Description                                                     |\n|:---------------------------------------------:| --------------------------------------------------------------- |\n| [hello-world](src/hello-world/)               | Classic hello world.                                            |\n| [hello-file](src/hello-file/)                 | Load and execute Ruby code from a file.                         |\n| [pushing-variables](src/pushing-variables/)   | Define various types of variables from C to Ruby.               |\n| [objects](src/objects/)                       | Create classes \u0026 objects from C.                                |\n| [method-defined](src/method-defined/)         | Check if a certain method is defined on Ruby.                   |\n| [call-methods](src/call-methods/)             | Call Ruby methods from C.                                       |\n| [using-cdata](src/using-cdata/)               | Wrap C data inside a Ruby object.                               |\n| [kwargs](src/kwargs/)                         | Parse keyword arguments.                                        |\n| [blocks](src/blocks/)                         | Interact with Ruby's block from C.                              |\n| [compiling-bytecode](src/compiling-bytecode/) | Compile Ruby code into bytecode format and save it on the disk. |\n\n### SDL2\n\n| Example                        | Description                                   |\n|:------------------------------:| --------------------------------------------- |\n| [sdl-wrapper](src/sdl-wrapper) | Basic wrapper around SDL2 to create a window. |\n\n## Credits\n\nCredits where due, here are some helpful articles/post/resources that helped\nme to learn how to use MRuby:\n\n- [Executing Ruby code with MRuby](https://mruby.org/docs/articles/executing-ruby-code-with-mruby.html)\n- [MRuby GUI series](https://dev.to/roryo/a-new-smalltalk-style-environment-for-ruby-5f5c)\n\n## License\n\nAll the examples found here are licensed under the [MIT License](/LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchadowo%2Fmruby-examples","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchadowo%2Fmruby-examples","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchadowo%2Fmruby-examples/lists"}