{"id":13880541,"url":"https://github.com/bytecodealliance/wasmtime-rb","last_synced_at":"2025-07-12T01:13:25.613Z","repository":{"id":60018371,"uuid":"523356254","full_name":"bytecodealliance/wasmtime-rb","owner":"bytecodealliance","description":"Ruby WebAssembly runtime powered by Wasmtime","archived":false,"fork":false,"pushed_at":"2025-07-02T11:58:31.000Z","size":5148,"stargazers_count":114,"open_issues_count":9,"forks_count":22,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-07-02T12:44:42.127Z","etag":null,"topics":["ruby","rust","wasm","wasmtime"],"latest_commit_sha":null,"homepage":"https://bytecodealliance.github.io/wasmtime-rb/latest/","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bytecodealliance.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","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}},"created_at":"2022-08-10T13:32:51.000Z","updated_at":"2025-07-02T11:54:06.000Z","dependencies_parsed_at":"2023-10-05T01:19:58.976Z","dependency_job_id":"a81b5b56-c5e5-4af8-a5d6-3b7a1a2dc463","html_url":"https://github.com/bytecodealliance/wasmtime-rb","commit_stats":{"total_commits":239,"total_committers":8,"mean_commits":29.875,"dds":0.4225941422594143,"last_synced_commit":"1d61d4570743fde77b3bf6624b7368b507077bb9"},"previous_names":[],"tags_count":47,"template":false,"template_full_name":null,"purl":"pkg:github/bytecodealliance/wasmtime-rb","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bytecodealliance%2Fwasmtime-rb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bytecodealliance%2Fwasmtime-rb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bytecodealliance%2Fwasmtime-rb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bytecodealliance%2Fwasmtime-rb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bytecodealliance","download_url":"https://codeload.github.com/bytecodealliance/wasmtime-rb/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bytecodealliance%2Fwasmtime-rb/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264922909,"owners_count":23683705,"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":["ruby","rust","wasm","wasmtime"],"created_at":"2024-08-06T08:03:08.760Z","updated_at":"2025-07-12T01:13:25.593Z","avatar_url":"https://github.com/bytecodealliance.png","language":"Rust","readme":"\u003cdiv align=\"center\"\u003e\n  \u003ch1\u003e\u003ccode\u003ewasmtime-rb\u003c/code\u003e\u003c/h1\u003e\n\n  \u003cp\u003e\n    \u003cstrong\u003eRuby embedding of\n    \u003ca href=\"https://github.com/bytecodealliance/wasmtime\"\u003eWasmtime\u003c/a\u003e\u003c/strong\u003e\n  \u003c/p\u003e\n\n  \u003cstrong\u003eA \u003ca href=\"https://bytecodealliance.org/\"\u003eBytecode Alliance\u003c/a\u003e project\u003c/strong\u003e\n\n  \u003cp\u003e\n    \u003ca href=\"https://github.com/bytecodealliance/wasmtime-rb/actions?query=workflow%3ACI\"\u003e\n      \u003cimg src=\"https://github.com/bytecodealliance/wasmtime-rb/workflows/CI/badge.svg\" alt=\"CI status\"/\u003e\n    \u003c/a\u003e\n  \u003c/p\u003e\n\u003c/div\u003e\n\n## Goal\n\n`wasmtime-rb`'s goal is to expose the full power of Wasmtime in Ruby with\nminimal overhead, serving as a foundation layer for other projects or gems.\n\n## Installation\n\nAdd the `wasmtime` gem to your Gemfile and run `bundle install`:\n\n```ruby\ngem \"wasmtime\"\n```\n\nAlternatively, you can install the gem manually:\n\n```sh\ngem install wasmtime\n```\n\n### Precompiled gems\n\nWe recommend installing the `wasmtime` precompiled gems available for Linux, macOS, and Windows. Installing a precompiled gem avoids the need to compile from source code, which is generally slower and less reliable.\n\nWhen installing the `wasmtime` gem for the first time using `bundle install`, Bundler will automatically download the precompiled gem for your current platform. However, you will need to inform Bundler of any additional platforms you plan to use.\n\nTo do this, lock your Bundle to the required platforms you will need from the list of supported platforms below:\n\n```sh\nbundle lock --add-platform x86_64-linux # Standard Linux (e.g. Heroku, GitHub Actions, etc.)\nbundle lock --add-platform x86_64-linux-musl # MUSL Linux deployments (i.e. Alpine Linux)\nbundle lock --add-platform aarch64-linux # ARM64 Linux deployments (i.e. AWS Graviton2)\nbundle lock --add-platform x86_64-darwin # Intel MacOS (i.e. pre-M1)\nbundle lock --add-platform arm64-darwin # Apple Silicon MacOS  (i.e. M1)\n```\n\n## Usage\n\nExample usage:\n\n```ruby\nrequire \"wasmtime\"\n\n# Create an engine. Generally, you only need a single engine and can\n# re-use it throughout your program.\nengine = Wasmtime::Engine.new\n\n# Compile a Wasm module from either Wasm or WAT. The compiled module is\n# specific to the Engine's configuration.\nmod = Wasmtime::Module.new(engine, \u003c\u003c~WAT)\n  (module\n    (func $hello (import \"\" \"hello\"))\n    (func (export \"run\") (call $hello))\n  )\nWAT\n\n# Create a store. Store can keep state to be re-used in Funcs.\nstore = Wasmtime::Store.new(engine, {count: 0})\n\n# Define a Wasm function from Ruby code.\nfunc = Wasmtime::Func.new(store, [], []) do |caller|\n  puts \"Hello from Func!\"\n  caller.store_data[:count] += 1\n  puts \"Ran #{caller.store_data[:count]} time(s)\"\nend\n\n# Build the Wasm instance by providing its imports.\ninstance = Wasmtime::Instance.new(store, mod, [func])\n\n# Run the `run` export.\ninstance.invoke(\"run\")\n\n# Or: get the `run` export and call it.\ninstance.export(\"run\").to_func.call\n```\n\nFor more, see [examples](https://github.com/bytecodealliance/wasmtime-rb/tree/main/examples)\nor the [API documentation](https://bytecodealliance.github.io/wasmtime-rb/latest/).\n","funding_links":[],"categories":["Rust"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbytecodealliance%2Fwasmtime-rb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbytecodealliance%2Fwasmtime-rb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbytecodealliance%2Fwasmtime-rb/lists"}