{"id":19361291,"url":"https://github.com/zmitchell/nix-ffi-rs","last_synced_at":"2025-04-13T09:52:36.824Z","repository":{"id":193843506,"uuid":"687725913","full_name":"zmitchell/nix-ffi-rs","owner":"zmitchell","description":"Proof of concept bindings to the experimental Nix C API","archived":false,"fork":false,"pushed_at":"2023-09-06T20:02:05.000Z","size":24,"stargazers_count":8,"open_issues_count":3,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-27T01:21:53.302Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/zmitchell.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-09-05T22:00:44.000Z","updated_at":"2024-06-21T20:01:17.000Z","dependencies_parsed_at":null,"dependency_job_id":"600e3778-9ccf-4f4e-89fd-14eb9b623958","html_url":"https://github.com/zmitchell/nix-ffi-rs","commit_stats":null,"previous_names":["zmitchell/nix-ffi-rs"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zmitchell%2Fnix-ffi-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zmitchell%2Fnix-ffi-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zmitchell%2Fnix-ffi-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zmitchell%2Fnix-ffi-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zmitchell","download_url":"https://codeload.github.com/zmitchell/nix-ffi-rs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248695303,"owners_count":21146952,"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":[],"created_at":"2024-11-10T07:21:44.216Z","updated_at":"2025-04-13T09:52:36.798Z","avatar_url":"https://github.com/zmitchell.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nix-ffi-rs\n\nThis project is a set of experimental Rust bindings to Nix.\n\nThe project contains two parts:\n1. A set of bindings to the C++ implementation using [cxx](https://github.com/dtolnay/cxx).\n2. A set of bindings to the proposed Nix C API from [nix#8699](https://github.com/NixOS/nix/pull/8699).\n\nBoth projects have their own flakes, although there's probably a way to unify them and make the two projects part of a Rust workspace.\n\n### `nix-cxx`\nThis project takes a hardcoded string, parses it as a flake reference, then prints out the parsed flake reference.\nIn short, it round trips a string through Nix.\n\n### `nix-bindgen`\nThis project evaluates Nix code provided in one of a few ways:\n- A string passed to the `-e` flag.\n- A filename passed as the only positional argument.\n- A string piped to `stdin`.\n\nThe evaluation result is printed, but the program will crash if the expression doesn't evaluate to a string.\nThis isn't a problem with the API, I just stopped working on this once I got evaluation working.\n\n### Expectations\n\n- Quality\n    - Weekend project\n- Accepting contributions?\n    - Not really, this is a proof of concept. If you want to improve the infrastructure around this proof of concept (the flakes, the Rust workspace, etc), that would be more than welcome.\n- Stable?\n    - `nix-cxx` should be relatively stable since it doesn't rely on much of the Nix internals.\n    - `nix-bindgen` is \"lol no\" level of stability. The flake takes a PR commit as an input, so a rebase means this won't build anymore since that commit will no longer exist.\n\n## License\n\nLicensed under either of\n\n * Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)\n * MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)\n\nat your option.\n\n### Contribution\n\nUnless you explicitly state otherwise, any contribution intentionally\nsubmitted for inclusion in the work by you, as defined in the Apache-2.0\nlicense, shall be dual licensed as above, without any additional terms or\nconditions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzmitchell%2Fnix-ffi-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzmitchell%2Fnix-ffi-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzmitchell%2Fnix-ffi-rs/lists"}