{"id":19650081,"url":"https://github.com/pmatos/racket-binaryen","last_synced_at":"2026-02-11T14:33:12.259Z","repository":{"id":52170181,"uuid":"341957363","full_name":"pmatos/racket-binaryen","owner":"pmatos","description":"Binaryen bindings for Racket","archived":false,"fork":false,"pushed_at":"2021-10-20T07:51:13.000Z","size":790,"stargazers_count":11,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-08-13T15:48:00.543Z","etag":null,"topics":["binaryen","racket","webassembly"],"latest_commit_sha":null,"homepage":"","language":"Racket","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/pmatos.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}},"created_at":"2021-02-24T16:10:14.000Z","updated_at":"2022-02-16T06:18:34.000Z","dependencies_parsed_at":"2022-09-09T12:12:15.773Z","dependency_job_id":null,"html_url":"https://github.com/pmatos/racket-binaryen","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/pmatos/racket-binaryen","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pmatos%2Fracket-binaryen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pmatos%2Fracket-binaryen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pmatos%2Fracket-binaryen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pmatos%2Fracket-binaryen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pmatos","download_url":"https://codeload.github.com/pmatos/racket-binaryen/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pmatos%2Fracket-binaryen/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29335255,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-11T14:07:45.431Z","status":"ssl_error","status_checked_at":"2026-02-11T14:07:45.080Z","response_time":97,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["binaryen","racket","webassembly"],"created_at":"2024-11-11T14:56:32.753Z","updated_at":"2026-02-11T14:33:12.234Z","avatar_url":"https://github.com/pmatos.png","language":"Racket","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![](.github/badges/SponsoredbyIgalia.svg)](https://www.igalia.com)\n[![CI](https://github.com/pmatos/racket-binaryen/workflows/Test/badge.svg?branch=main)](https://github.com/pmatos/racket-binaryen/actions)\n[![Scribble](https://img.shields.io/badge/Docs-Scribble-blue.svg)](https://pmatos.github.io/racket-binaryen)\n\n# racket-binaryen\n\n[Binaryen](https://github.com/WebAssembly/binaryen) bindings for [Racket](https://www.racket-lang.org).\n\nCurrently, this work is experimental. There is some [initial documentation](https://pmatos.github.io/racket-binaryen) evolving together with the implementation of safe bindings but it's highly incomplete. \n\nAndy Wingo gave a [\"Compiling to WebAssembly\"](https://fosdem.org/2021/schedule/event/webassembly/) presentation at FOSDEM'21, and published his [artifacts](https://github.com/wingo/compiling-to-webassembly).\n\nI implemented the same compiler in Racket using the binaryen bindings (see `tests/wingo-raw.rkt`). To run it on the same example Andy presented try:\n\n```\n$ racket test/wingo-raw.rkt test/wingo_fact.scm \n\"Compiled module:\"\n(module\n (type $i32_=\u003e_i32 (func (param i32) (result i32)))\n (export \"fac\" (func $fac))\n (func $fac (param $0 i32) (result i32)\n  (if (result i32)\n   (i32.eqz\n    (local.get $0)\n   )\n   (i32.const 1)\n   (i32.mul\n    (local.get $0)\n    (call $fac\n     (i32.sub\n      (local.get $0)\n      (i32.const 1)\n     )\n    )\n   )\n  )\n )\n)\n\"Optimized module:\"\n(module\n (type $i32_=\u003e_i32 (func (param i32) (result i32)))\n (export \"fac\" (func $fac))\n (func $fac (; has Stack IR ;) (param $0 i32) (result i32)\n  (if (result i32)\n   (local.get $0)\n   (i32.mul\n    (call $fac\n     (i32.sub\n      (local.get $0)\n      (i32.const 1)\n     )\n    )\n    (local.get $0)\n   )\n   (i32.const 1)\n  )\n )\n)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpmatos%2Fracket-binaryen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpmatos%2Fracket-binaryen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpmatos%2Fracket-binaryen/lists"}