{"id":15401136,"url":"https://github.com/sunfishcode/eyra-c","last_synced_at":"2025-04-15T22:30:42.509Z","repository":{"id":212156530,"uuid":"730842601","full_name":"sunfishcode/eyra-c","owner":"sunfishcode","description":"Support for compiling C programs with Eyra","archived":false,"fork":false,"pushed_at":"2024-10-13T17:03:02.000Z","size":12,"stargazers_count":13,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-13T10:55:00.234Z","etag":null,"topics":["rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/sunfishcode.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":"2023-12-12T19:48:15.000Z","updated_at":"2024-11-17T20:37:54.000Z","dependencies_parsed_at":"2023-12-21T02:00:01.892Z","dependency_job_id":"cf437099-abb5-4e25-a3ca-62ffed58b410","html_url":"https://github.com/sunfishcode/eyra-c","commit_stats":{"total_commits":3,"total_committers":1,"mean_commits":3.0,"dds":0.0,"last_synced_commit":"a1e68d6ef81e6a988a7ef0dbe2df4bb331c47991"},"previous_names":["sunfishcode/eyra-c"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sunfishcode%2Feyra-c","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sunfishcode%2Feyra-c/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sunfishcode%2Feyra-c/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sunfishcode%2Feyra-c/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sunfishcode","download_url":"https://codeload.github.com/sunfishcode/eyra-c/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249165867,"owners_count":21223337,"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":["rust"],"created_at":"2024-10-01T15:56:35.304Z","updated_at":"2025-04-15T22:30:42.172Z","avatar_url":"https://github.com/sunfishcode.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# eyra-c\n\nSupport for compiling C programs with Eyra.\n\nSpecifically, this repo compiles [Eyra] into a [staticlib] to make a libc.a:\n\n```sh\n$ cargo build\n   Compiling eyra-c v0.0.0 (/home/eyra/ecosystem/eyra-c)\n    Finished dev [unoptimized + debuginfo] target(s) in 0.00s\n$ ls target/debug/libc.a \ntarget/debug/libc.a\n$\n```\n\nThis libc.a can be used by C compilers, with -nostdlib to disable the\nsystem libraries:\n\n```sh\n$ cat c-tests/src/hello.c \n#include \u003cstdio.h\u003e\n\nint main(void) {\n    printf(\"Hello, world!\\n\");\n    return 0;\n}\n$ cc c-tests/src/hello.c -nostdlib target/debug/libc.a \n$ ./a.out \nHello, world!\n$\n```\n\n💃\n\nAmusingly, even though this libc.a is built entirely from Rust, it cannot be\nused by Rust programs, because a staticlib library is meant to be linked into\na C program, so it includes the Rust standard library. If linked into a Rust\nprogram, it would conflict with the Rust standard library.\n\nTo use Eyra in a Rust program, [use Eyra as a dependency].\n\n[Eyra]: https://github.com/sunfishcode/eyra\n[staticlib]: https://doc.rust-lang.org/reference/linkage.html#linkage\n[use Eyra as a dependency]: https://github.com/sunfishcode/eyra#quick-start\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsunfishcode%2Feyra-c","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsunfishcode%2Feyra-c","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsunfishcode%2Feyra-c/lists"}