{"id":18099766,"url":"https://github.com/barafael/bamiruffi","last_synced_at":"2026-04-02T18:43:51.932Z","repository":{"id":38225786,"uuid":"88278695","full_name":"barafael/BaMiRuFFI","owner":"barafael","description":"Bare Minimum Rust Foreign Function Interface for C","archived":false,"fork":false,"pushed_at":"2023-06-08T09:31:44.000Z","size":37,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2026-01-17T11:54:24.681Z","etag":null,"topics":["c","ffi","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/barafael.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,"zenodo":null}},"created_at":"2017-04-14T15:20:00.000Z","updated_at":"2023-03-17T11:19:36.000Z","dependencies_parsed_at":"2025-04-13T16:07:46.530Z","dependency_job_id":"e6f946d6-2571-4f13-93a8-b2cf1ba3ae36","html_url":"https://github.com/barafael/BaMiRuFFI","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/barafael/BaMiRuFFI","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barafael%2FBaMiRuFFI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barafael%2FBaMiRuFFI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barafael%2FBaMiRuFFI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barafael%2FBaMiRuFFI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/barafael","download_url":"https://codeload.github.com/barafael/BaMiRuFFI/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barafael%2FBaMiRuFFI/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31313235,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-02T12:59:32.332Z","status":"ssl_error","status_checked_at":"2026-04-02T12:54:48.875Z","response_time":89,"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":["c","ffi","rust"],"created_at":"2024-10-31T21:11:07.697Z","updated_at":"2026-04-02T18:43:51.916Z","avatar_url":"https://github.com/barafael.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BaMiRuFFI\n\n### A bare minimum Rust FFI demo\n\n##### Overview\nA compiled Rust program is just a binary for a certain architecture. So is a compiled C program.\n\nThis means that a function call in Rust looks similar to one in C in terms of the assembler output.\n\nA rust program can call a function in a C program if the two programs are 'compiled together', and this is exactly what the Rust Foreign Function Interface is useful for.\n\nHowever, to be able to 'see' your C functions from Rust, there needs to be a link which connects your C function calls in Rust to their counterparts in the C program \n(this is needed by the Rust compiler - it wants to know all function signatures at compile time in order to check types). This is usually handled by a header file in C.\n\nRust-bindgen automagically translates any C header file you throw at it to an equivalent Rust binding. It still uses raw pointers though.\n\nIn the end of the compilation, the cc crate handles linking both the original C library binary and your Rust binary together so that you can call C functions from Rust.\n\nAll those build steps are done in build.rs, and all the tools needed (bindgen and the cc crate) are only build dependencies (as specified in Cargo.toml).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbarafael%2Fbamiruffi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbarafael%2Fbamiruffi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbarafael%2Fbamiruffi/lists"}