{"id":15501475,"url":"https://github.com/joshnuss/elixir-ffi","last_synced_at":"2025-07-30T15:18:04.022Z","repository":{"id":62429563,"uuid":"42898087","full_name":"joshnuss/elixir-ffi","owner":"joshnuss","description":"Foreign Function Interface (FFI) for Elixir","archived":false,"fork":false,"pushed_at":"2018-09-17T04:20:47.000Z","size":19,"stargazers_count":56,"open_issues_count":1,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-11T00:41:34.295Z","etag":null,"topics":["elixir","ffi"],"latest_commit_sha":null,"homepage":null,"language":"Elixir","has_issues":true,"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/joshnuss.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}},"created_at":"2015-09-21T22:52:17.000Z","updated_at":"2024-07-25T17:31:38.000Z","dependencies_parsed_at":"2022-11-01T20:06:58.750Z","dependency_job_id":null,"html_url":"https://github.com/joshnuss/elixir-ffi","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/joshnuss%2Felixir-ffi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joshnuss%2Felixir-ffi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joshnuss%2Felixir-ffi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joshnuss%2Felixir-ffi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joshnuss","download_url":"https://codeload.github.com/joshnuss/elixir-ffi/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249297754,"owners_count":21246470,"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":["elixir","ffi"],"created_at":"2024-10-02T09:04:30.642Z","updated_at":"2025-04-17T01:31:42.091Z","avatar_url":"https://github.com/joshnuss.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"FFI\n===\n\n*** Warning: Turns out this is a really bad idea, do not use! When the BEAM calls native functions it needs to know how many reductions should be used. Otherwise calling a long running function can break the scheduling completly, because with this approach a long running function is considered 1 reduction ***\n\nAn easy way to call external functions (e.g. C functions) from [Elixir](https://github.com/elixir-lang/elixir).\n\nInspired by [Ruby's FFI](https://github.com/ffi/ffi)\n\n** This is alpha software **\n\n## Example Program\n\n```elixir\ndefmodule MyLib do\n  use FFI.Library, name: \"libstdc++.so.6\"\n\n  attach_function :puts, [:string], :int\nend\n\nMyLib.puts(\"Hello World from C stdlib\")\n```\n\n## Installation\n\nThe package can be installed by adding `ffi` to your list of dependencies in `mix.exs`:\n\n```elixir\ndef deps do\n  [{:ffi, git: \"https://github.com/joshnuss/elixir-ffi.git\"}]\nend\n```\n\n## Running Examples\n\n```shell\nmix run examples/basic.exs\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoshnuss%2Felixir-ffi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoshnuss%2Felixir-ffi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoshnuss%2Felixir-ffi/lists"}