{"id":13741456,"url":"https://github.com/dantecatalfamo/mruby-zig","last_synced_at":"2025-05-14T11:34:11.125Z","repository":{"id":43231571,"uuid":"462496637","full_name":"dantecatalfamo/mruby-zig","owner":"dantecatalfamo","description":"mruby bindings for zig","archived":false,"fork":false,"pushed_at":"2023-06-20T23:13:07.000Z","size":76,"stargazers_count":35,"open_issues_count":2,"forks_count":7,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-05-06T06:08:34.766Z","etag":null,"topics":["bindings","mruby","ruby","zig","zig-library"],"latest_commit_sha":null,"homepage":"","language":"Zig","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/dantecatalfamo.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}},"created_at":"2022-02-22T22:30:35.000Z","updated_at":"2025-02-22T11:26:56.000Z","dependencies_parsed_at":"2024-05-03T03:01:54.074Z","dependency_job_id":"c6d02674-9407-4731-8e47-7178b39bea4e","html_url":"https://github.com/dantecatalfamo/mruby-zig","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dantecatalfamo%2Fmruby-zig","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dantecatalfamo%2Fmruby-zig/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dantecatalfamo%2Fmruby-zig/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dantecatalfamo%2Fmruby-zig/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dantecatalfamo","download_url":"https://codeload.github.com/dantecatalfamo/mruby-zig/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254131991,"owners_count":22020059,"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","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":["bindings","mruby","ruby","zig","zig-library"],"created_at":"2024-08-03T04:00:59.415Z","updated_at":"2025-05-14T11:34:10.743Z","avatar_url":"https://github.com/dantecatalfamo.png","language":"Zig","readme":"# mruby-zig\n\n[mruby](https://mruby.org/) bindings for [zig](https://ziglang.org/)!\n\nMruby is the lightweight implementation of the Ruby language complying with part of the ISO standard.\n\nMruby documentation can be found [here](https://mruby.org/docs/api/).\n\n## Embedding\n\nTo embed `mruby` into another zig project, you just need to\nrecursively clone this repository and add a couple of lines to your\n`build.zig`.\n\n- Add the following lines to `build.zig`, with the paths changed to match the correct location\n\n```zig\nconst addMruby = @import(\"mruby-zig/build.zig\").addMruby;\n\npub fn build(b: *std.Build) void {\n    const target = b.standardTargetOptions(.{});\n    const optimize = b.standardOptimizeOption(.{});\n\n    const exe = b.addExecutable(.{\n        .name = \"example\",\n        .root_source_file = .{ .path = \"src/main.zig\" },\n        .target = target,\n        .optimize = optimize,\n    });\n    b.installArtifact(exe);\n    addMruby(b, exe);\n\n    // ...\n}\n```\n\n- Import `mruby` and start a new interpreter\n\n```zig\nconst std = @import(\"std\");\nconst mruby = @import(\"mruby\");\n\npub fn main() anyerror!void {\n    // Opening a state\n    var mrb = try mruby.open();\n    defer mrb.close();\n\n    // Loading a program from a string\n    mrb.load_string(\"puts 'hello from ruby!'\");\n}\n  ```\n\n## Example\n\nSee `examples/main.zig`\n","funding_links":[],"categories":["Libraries"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdantecatalfamo%2Fmruby-zig","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdantecatalfamo%2Fmruby-zig","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdantecatalfamo%2Fmruby-zig/lists"}