{"id":13484837,"url":"https://github.com/maekawatoshiki/sericum","last_synced_at":"2026-01-16T19:45:46.804Z","repository":{"id":57553412,"uuid":"193330137","full_name":"maekawatoshiki/sericum","owner":"maekawatoshiki","description":"(Toy) Compiler Infrastructure influenced by LLVM written in Rust","archived":false,"fork":false,"pushed_at":"2020-12-15T06:41:54.000Z","size":2255,"stargazers_count":403,"open_issues_count":0,"forks_count":14,"subscribers_count":17,"default_branch":"master","last_synced_at":"2026-01-14T01:34:10.121Z","etag":null,"topics":["compiler","llvm","rust"],"latest_commit_sha":null,"homepage":null,"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/maekawatoshiki.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}},"created_at":"2019-06-23T09:37:17.000Z","updated_at":"2026-01-13T18:23:53.000Z","dependencies_parsed_at":"2022-09-26T18:51:02.735Z","dependency_job_id":null,"html_url":"https://github.com/maekawatoshiki/sericum","commit_stats":null,"previous_names":["maekawatoshiki/cilk"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/maekawatoshiki/sericum","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maekawatoshiki%2Fsericum","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maekawatoshiki%2Fsericum/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maekawatoshiki%2Fsericum/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maekawatoshiki%2Fsericum/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maekawatoshiki","download_url":"https://codeload.github.com/maekawatoshiki/sericum/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maekawatoshiki%2Fsericum/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28481935,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T11:59:17.896Z","status":"ssl_error","status_checked_at":"2026-01-16T11:55:55.838Z","response_time":107,"last_error":"SSL_read: 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":["compiler","llvm","rust"],"created_at":"2024-07-31T17:01:35.669Z","updated_at":"2026-01-16T19:45:46.676Z","avatar_url":"https://github.com/maekawatoshiki.png","language":"Rust","funding_links":[],"categories":["Rust"],"sub_categories":[],"readme":"# Sericum\n\n[![CircleCI](https://circleci.com/gh/maekawatoshiki/sericum.svg?style=shield)](https://circleci.com/gh/maekawatoshiki/sericum)\n[![](http://img.shields.io/badge/license-MIT-blue.svg)](./LICENSE)\n\nCompiler Infrastructure influenced by LLVM written in Rust\n\nDo not expect too much stuff!\n\n# To Do\n\n- [ ] Implement basic block parameters\n- [ ] Make it possible to generate code for multiple targets without rebuilding sericum itself\n- [ ] Verify IR\n- [ ] More optimizations for IR\n- [ ] Support returning struct as value\n- [ ] Write documents\n\n# Build\n\n**Requirement: Rust nightly**\n\n```sh\ncargo test           --features x86_64                          # build for x86_64\ncargo test brainfuxk --features x86_64 --release -- --nocapture # this is fun. just try it.\ncargo test           --features aarch64                         # build for aarch64. a few features are implemented.\ncargo test           --features riscv64                         # currently doesn't work. need help.\n```\n\n# Example\n\n- [Generate a function which calculates a fibonacci number](./tests/demo.rs)\n\n```sh\ncargo test demo --features $ARCH -- --nocapture # $ARCH is x86_64 or aarch64\n```\n\n- Useful macro is available to describe IR\n\n```rust\nlet fibo = sericum_ir!(m; define [i32] f [(i32)] {\n    entry:\n        cond = icmp le (%arg.0), (i32 2);\n        br (%cond) l1, l2;\n    l1:\n        ret (i32 1);\n    l2:\n        a1 = sub (%arg.0), (i32 1);\n        r1 = call f [(%a1)];\n        a2 = sub (%arg.0), (i32 2);\n        r2 = call f [(%a2)];\n        r3 = add (%r1), (%r2);\n        ret (%r3);\n});\n```\n\n# Make your own language using sericum as backend\n\n``./minilang`` and ``./sericumcc`` may help you.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaekawatoshiki%2Fsericum","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaekawatoshiki%2Fsericum","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaekawatoshiki%2Fsericum/lists"}