{"id":25778438,"url":"https://github.com/jethrodaniel/mruby.zig","last_synced_at":"2025-09-08T00:05:50.996Z","repository":{"id":278500435,"uuid":"935254837","full_name":"jethrodaniel/mruby.zig","owner":"jethrodaniel","description":"MRuby, built with Zig (no rake!)","archived":false,"fork":false,"pushed_at":"2025-07-16T03:19:14.000Z","size":105,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-17T06:04:28.178Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Zig","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jethrodaniel.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSES/MIT.txt","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},"funding":{"github":["jethrodaniel"]}},"created_at":"2025-02-19T06:38:08.000Z","updated_at":"2025-07-16T03:19:02.000Z","dependencies_parsed_at":"2025-06-02T00:29:45.279Z","dependency_job_id":"653fcc8d-b5b8-44ec-b535-44e8ece3f6d3","html_url":"https://github.com/jethrodaniel/mruby.zig","commit_stats":null,"previous_names":["jethrodaniel/mruby.zig"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/jethrodaniel/mruby.zig","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jethrodaniel%2Fmruby.zig","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jethrodaniel%2Fmruby.zig/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jethrodaniel%2Fmruby.zig/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jethrodaniel%2Fmruby.zig/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jethrodaniel","download_url":"https://codeload.github.com/jethrodaniel/mruby.zig/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jethrodaniel%2Fmruby.zig/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274113090,"owners_count":25224335,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-07T02:00:09.463Z","response_time":67,"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":[],"created_at":"2025-02-27T06:32:05.907Z","updated_at":"2025-09-08T00:05:50.986Z","avatar_url":"https://github.com/jethrodaniel.png","language":"Zig","funding_links":["https://github.com/sponsors/jethrodaniel"],"categories":[],"sub_categories":[],"readme":"\u003c!--\nSPDX-FileCopyrightText: © 2025 Mark Delk \u003cjethrodaniel@gmail.com\u003e\n\nSPDX-License-Identifier: MIT\n--\u003e\n\n# mruby.zig\n\nBuild [mruby](https://github.com/mruby/mruby) using [zig](https://ziglang.org) `0.14.1` (no rake!).\n\n## About\n\n\u003e Yeah, but your scientists were so preoccupied with whether or not they could, they didn't stop to think if they should.\n\u003e\n\u003e --- Jeff Goldblum (Jurassic Park, 1993)\n\nThis project builds MRuby from source, only using Zig.\n\nThis means we emulate MRuby's non-trivial Rake-based build process entirely in Zig.\n\n**NOTE**: We only support zig `0.14.1` at the moment.\n\n## Issues\n\n- Non-standard library gems that use any Ruby logic in their `mrbgem.rake` files aren't supported\n- Symbol preallocation isn't supported (this depends on Ruby regex to create the C files)\n- Using `mruby.zig` in transitive Zig dependencies will likely cause issues (just use it globally in one package for now, TODO)\n\n## Usage\n\n### Command line tools\n\nTo install all the CLI programs:\n\n```\nzig build\n```\n```\n$ tree zig-out/bin/\nzig-out/bin/\n├── example-c\n├── example-zig\n├── host-mrbc\n├── mirb\n├── mrbc\n├── mrbtest\n├── mruby\n└── mruby-strip\n```\n\nSee `zig build -h` for information about everything that's available:\n\n```\nzig build -h\n```\n```\nUsage: /path/to/zig build [steps] [options]\n\nSteps:\n  install (default)            Copy build artifacts to prefix path\n  uninstall                    Remove build artifacts from prefix path\n  mrbc                         Run mrbc\n  host-mrbc                    Run host-mrbc\n  mruby                        Run mruby\n  mirb                         Run mirb\n  mrdb                         Run mrdb\n  mruby-strip                  Run mruby-strip\n  mrbtest                      Run mrbtest\n  example-c                    Run src/example.c\n  example-rb                   Run src/example.rb\n  example-zig                  Run src/example.zig\n```\n\nTo run MRuby's tests:\n\n```\nzig build mrbtest\n```\n```\nmrbtest - Embeddable Ruby Test\n\n...............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................\n  Total: 1647\n     OK: 1647\n     KO: 0\n  Crash: 0\nWarning: 0\n   Skip: 0\n   Time: 1.07 seconds\n\n```\n\nTo use `mirb`, `mruby`, etc:\n\n```console\n$ zig build mirb\nmirb - Embeddable Interactive Ruby Shell\n\n\u003e MRUBY_VERSION\n =\u003e \"3.4.0\"\n```\n\n### Examples\n\nTo run the examples:\n\n```\nzig build example-c\nzig build example-rb\nzig build example-zig\n```\n\n### Cross compilation\n\nLinux/Mac are the only targets currently supported, but support for others shouldn't be difficult.\n\n```\nzig build -Doptimize=ReleaseFast -Dtarget=x86_64-macos-none\nzig build -Doptimize=ReleaseFast -Dtarget=x86_64-linux-musl\nzig build -Doptimize=ReleaseFast -Dtarget=x86_64-linux-gnu\n```\n\n### Using in a Zig project\n\nAdd to your `build.zig.zon`:\n\n```\nzig fetch --save=mruby \"git+https://github.com/jethrodaniel/mruby.zig#main\"\n```\n\nThen update your `build.zig` like so:\n\n```\nTODO\n```\n\nFor more detail, see the `example-zig` step in [build.zig](build.zig), and the example file, [src/example.zig](src/example.zig).\n\nTODO: document creating and using custom gems, using only a subset of the standard library, etc\n\n## Contributing\n\nBug reports and pull requests are welcome at https://github.com/jethrodaniel/mruby.zig\n\n## Acknowledgements\n\nThis project was inspired by https://github.com/dantecatalfamo/mruby-zig (MIT):\n\nSome differences:\n\n- we use `@cImport` instead of zig bindings\n- we use `zig build` instead of `rake`\n\n## License\n\n[MIT](https://spdx.org/licenses/MIT.html), same as [MRuby](https://github.com/mruby/mruby).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjethrodaniel%2Fmruby.zig","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjethrodaniel%2Fmruby.zig","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjethrodaniel%2Fmruby.zig/lists"}