{"id":26220811,"url":"https://github.com/timower/bootstrap-c","last_synced_at":"2026-02-12T21:31:49.569Z","repository":{"id":278336176,"uuid":"832731647","full_name":"timower/bootstrap-c","owner":"timower","description":null,"archived":false,"fork":false,"pushed_at":"2026-01-16T23:01:16.000Z","size":820,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-17T06:33:34.090Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","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/timower.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-07-23T15:56:27.000Z","updated_at":"2025-12-22T21:34:10.000Z","dependencies_parsed_at":"2025-07-14T22:18:52.819Z","dependency_job_id":"d1f6117d-0ae9-40be-b35e-6db80f148d8f","html_url":"https://github.com/timower/bootstrap-c","commit_stats":null,"previous_names":["timower/bootstrap-c"],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/timower/bootstrap-c","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timower%2Fbootstrap-c","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timower%2Fbootstrap-c/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timower%2Fbootstrap-c/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timower%2Fbootstrap-c/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/timower","download_url":"https://codeload.github.com/timower/bootstrap-c/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timower%2Fbootstrap-c/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29381760,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-12T20:34:40.886Z","status":"ssl_error","status_checked_at":"2026-02-12T20:23:00.490Z","response_time":55,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":[],"created_at":"2025-03-12T15:19:26.545Z","updated_at":"2026-02-12T21:31:49.564Z","avatar_url":"https://github.com/timower.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"Bootstrap\n=========\n\nA project exploring compiler bootstrapping.\nThe first commit is a c-subset compiler that can compile itself.\nEach commit after adds a new feature, and is compiled by the previous commit.\n\n\nTODO\n----\n - [x] Add correct integer types (i8, i16, i32, i64) and (u8, u16, u32, u64).\n - [x] Add `as` cast operator.\n - [x] Remove implicit casts.\n - [x] Support multiple file imports.\n - [x] Type safe enums.\n    * `enum Foo { A, B }; enum Foo x = Foo::A;`\n - [x] Change type syntax to `let foo: type` and func to `func foo() -\u003e type`.\n    * `let x: i32 = 5;`\n    * `func foo() -\u003e i32 { return 5; }`\n - [x] Fix static arrays, and decay from array to pointer.\n    * Index only for array \u0026 future slice types, or pointers to them.\n    * Pointer to array can be converted to pointer to first elem for C interop.\n - [x] Switch statements that make sense.\n - [x] Struct init and struct expressions.\n    * `Foo{x = 1, y = 2}`?\n - [x] Avoid aggregates in LLVM registers.\n    * Aggregates are represented as `ptr` to them on stack.\n    * Except for function args, returns, struct members.\n    * `a = b` for aggregate creates memcpy.\n    * `Foo{a = 1}` generates `alloca`\n    * Function args and ret need to be store/loaded.\n - [x] Type safe unions.\n - [x] Rename `NULL` to `null`\n - [x] Let expressions, `if (let a = x as foo)` support.\n - [x] Auto `\u0026` on union -\u003e struct ptr casts?\n - [x] Support extern for external functions.\n - [x] Remove function declarations, supporting use before define.\n - [x] Fix relative imports, split source to `src/sema/...`\n - [x] `bool` (i1) type.\n - [x] Model LLVM IR.\n\n - [x] Constants `const x = 12;`\n - [x] Platform specific code:\n   * Add host machine constants (`__WIN32__`, `__LINUX__`, etc).\n   * Host specific imports `libc.win32.b`, `libc.linux.b`, loaded if exists.\n   * Target command line flag.\n - [x] Fix windows/mingw builds.\n - [x] Fix `realpath` \u0026 `dprintf` usage.\n - [x] Move decl, stmt and expr to Unions.\n - [x] `typeof(foo)` expression to do:\n     * `sizeof(typeof(foo))`\n     * `let x: typeof(foo) = 12`\n\n - [x] Function types \u0026 function pointer support.\n\n - [x] No semicolons for decls.\n\n - [x] Add target pointer size, Add iptr and uptr types.\n\n - [ ] Generic functions.\n     * `func foo\u003cT\u003e(a: T, b: T) -\u003e T { return a + b; }`\n - [ ] `is[T, U](union: U*) -\u003e bool` function.\n     * `is[T, U](union: U*) -\u003e bool { return union as T* != NULL; }`\n - [ ] Generic types\n\n - [ ] Isolated imports.\n\n - [ ] Methods and method call syntax\n    * `a.foo(...)` -\u003e `Foo::foo(a, ...)`\n\n\n\n - [ ] Add slice type.\n    * syntax: slice: `[i8]`, array `i8[N]` or `i8[] = [1, 2]`\n\n    * stored as `{ ptr: T*, len: isize }`\n    * arrays become `[1, 2, 3]`\n    * array to slice: `array[start:end]` start \u0026 end are optional\n    * array or pointer to it? can be converted to slice implicitly\n\n - [ ] aarch64 backend\n - [ ] Remove intrinsic lists for types, cache types.\n - [ ] Add references?\n - [ ] Actual constant expressions and decls.\n - [ ] Correctly padded structs.\n - [ ] continue statement.\n - [ ] x86_64 backend\n\nLSP TODO\n--------\n\n - [x] Report all sema'd files in -sema-lsp\n - [x] Send empty list of diagnostics for clean files.\n - [x] Add formatter support.\n - [ ] Don't stop on first sema fail.\n - [ ] Workspace symbols? Autocomplete? ...\n\nFormatter TODO\n--------------\n\n - [x] Add output \u0026 in-place argument\n - [x] Preserve newlines and comments in unions.\n - [x] Preserve char constants.\n - [ ] Fix trailing comments in block scopes.\n - [ ] Preserve newline between comments, and comments \u0026 code.\n - [ ] Fix newline bugs\n   `let x = y + z` Don't split after `=` if `+` is moved to new line.\n - [ ] Auto split based on max line length (88 chars?)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimower%2Fbootstrap-c","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftimower%2Fbootstrap-c","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimower%2Fbootstrap-c/lists"}