{"id":18556826,"url":"https://github.com/urbit/rust-mixed-with-c","last_synced_at":"2025-07-06T04:33:11.776Z","repository":{"id":72682771,"uuid":"165347773","full_name":"urbit/rust-mixed-with-c","owner":"urbit","description":null,"archived":false,"fork":false,"pushed_at":"2019-02-28T00:58:24.000Z","size":24307,"stargazers_count":4,"open_issues_count":1,"forks_count":1,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-10T16:59:57.548Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Nix","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/urbit.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}},"created_at":"2019-01-12T04:50:55.000Z","updated_at":"2023-07-25T14:22:53.000Z","dependencies_parsed_at":null,"dependency_job_id":"a33e5aaa-f19e-4e9a-88af-1a5deb18400d","html_url":"https://github.com/urbit/rust-mixed-with-c","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/urbit/rust-mixed-with-c","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/urbit%2Frust-mixed-with-c","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/urbit%2Frust-mixed-with-c/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/urbit%2Frust-mixed-with-c/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/urbit%2Frust-mixed-with-c/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/urbit","download_url":"https://codeload.github.com/urbit/rust-mixed-with-c/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/urbit%2Frust-mixed-with-c/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263849047,"owners_count":23519573,"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-06T21:33:32.416Z","updated_at":"2025-07-06T04:33:11.771Z","avatar_url":"https://github.com/urbit.png","language":"Nix","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `rust-mixed-with-c`\n\nThis was an experiment to see what it looks like to combine C and Rust\nin a single project, and then it turned into a full-blow nixification\nof the all Urbit code.\n\nCheck out `.travis.yml` to see how this works in CI.\n\n## Quick Start\n\n```bash\ncurl https://nixos.org/nix/install | sh\n  - nix-build\n  - ./sh/cachix\n  - nix-shell --pure --command ./sh/vere-tests\n```\n\n## Shared Build Caches\n\nFirst, get `CACHIX_AUTH_TOKEN` from another dev, and then run the\nfollowing commands. You should only need to do this once.\n\n```bash\nnix-env -iA cachix -f https://cachix.org/api/v1/install\ncachix authtoken \"$CACHIX_AUTH_TOKEN\" \u003e/dev/null\ncachix use urbit\n```\n\nIn order to build everything an push results to the shared cache, run:\n\n```bash\n./sh/cachix\n```\n\n## Open Questions About Monorepo layout\n\n- Should nix build scripts live *in* the packages\n  (i.e. `pkg/urbit/default.nix`) or outside of it\n  (nix/pkgs/urbit/default.nix)? What are the pros and cons of moving\n  them into the packages?\n\n  - PRO Setting up the `nix-shell` flow is slightly cleaner.\n  - PRO Everything in one place, less fragmentation.\n  - CON Nix build scripts become part of the build. Changes to the build\n        scripts trigger rebuilds (or you can filter them out, but that adds\n        a little bit of complexity to every build)\n  - CON Packages get messier. Five additional files in the root of\n        each package: `default.nix`, `release.nix`, `shell.nix`,\n        `builder.sh`, `release.sh`.\n\n## Open Questions About the Bootstrapping Pills\n\nThe pill that's used for bootstrapping in CI is stored in\n`bin/pill/*.pill`. This doesn't need to be updated constantly. In my\nmind, I'm imagining that it would get updated for each release, or\nupdated whenever we make a breaking change to the kernel. This deserves\nfurther discussion.\n\n## CI TODOs\n\n- Save 14s by using the travis cache to cache the `cachix` install.\n\n  https://github.com/travis-ci/travis-ci/issues/6604\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Furbit%2Frust-mixed-with-c","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Furbit%2Frust-mixed-with-c","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Furbit%2Frust-mixed-with-c/lists"}