{"id":17210464,"url":"https://github.com/samth/racket-autoffi","last_synced_at":"2026-02-01T15:31:40.140Z","repository":{"id":139588071,"uuid":"108000244","full_name":"samth/racket-autoffi","owner":"samth","description":"A Racket FFI binding generator based on AutoFFI","archived":false,"fork":false,"pushed_at":"2017-10-23T15:20:36.000Z","size":17,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-10-10T13:38:23.267Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.autoffi.net/langs/racket","language":"Racket","has_issues":false,"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/samth.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2017-10-23T15:20:19.000Z","updated_at":"2020-01-15T12:53:06.000Z","dependencies_parsed_at":null,"dependency_job_id":"5c667ea8-4153-4f5d-979d-9ea44bd660ae","html_url":"https://github.com/samth/racket-autoffi","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/samth/racket-autoffi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samth%2Fracket-autoffi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samth%2Fracket-autoffi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samth%2Fracket-autoffi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samth%2Fracket-autoffi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/samth","download_url":"https://codeload.github.com/samth/racket-autoffi/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samth%2Fracket-autoffi/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28981063,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-01T13:38:33.235Z","status":"ssl_error","status_checked_at":"2026-02-01T13:38:32.912Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":[],"created_at":"2024-10-15T02:54:22.271Z","updated_at":"2026-02-01T15:31:40.126Z","avatar_url":"https://github.com/samth.png","language":"Racket","funding_links":[],"categories":[],"sub_categories":[],"readme":"Racket AutoFFI\n===============\n\nThis is the Racket binding generator built on top of [AutoFFI](https://github.com/AutoFFI/AutoFFI).\n\n## Installation\n\n```\nraco pkg install https://github.com/AutoFFI/racket-autoffi.git\n```\n\n## Getting Started\n\nThis is a very basic example showing what AutoFFI is capable of doing.\n\nSay we have the following program in plain C:\n\n**myprog.c**\n```c\nint add(int a, int b) {\n  return a + b;\n}\n```\n\nWe can compile this program on OS X as follows:\n\n```bash\n$ clang -o myprog.dylib -shared myprog.c\n``` \n\nThis gives us a binary:\n\n```bash\n$ hexdump myprog.dylib\n0000000 cf fa ed fe 07 00 00 01 03 00 00 00 06 00 00 00\n0000010 0c 00 00 00 78 02 00 00 85 00 10 00 00 00 00 00\n0000020 19 00 00 00 e8 00 00 00 5f 5f 54 45 58 54 00 00\n0000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00\n0000040 00 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00\n...\n```\n\nThe binary does not contain enough information to link to it. AutoFFI generates\nthe missing type information. In order to do this, we need our \n[AutoFFI tool](http://github.com/AutoFFI/AutoFFI):\n\n```bash\n$ affc myprog.c \u003e myprog.json\n```\n\nImporting this binary in Racket now requires only two lines of code. No need to\ndefine complex FFI structures!\n\n**main.rkt**\n```racket;\n#lang racket\n(require autoffi)\n(require/foreign \"myprog\")\n(add 1 2)\n```\n\nIf we run this program, we get:\n\n```bash\n$ racket test.rkt\n3\n```\n\nThat's it! Programs can get much more complicated, of course. Any bugs should\nbe posted in the [issue tracker](http://github.com/AutoFFI/racket-autoffi/issues).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamth%2Fracket-autoffi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamth%2Fracket-autoffi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamth%2Fracket-autoffi/lists"}