{"id":16906664,"url":"https://github.com/rsms/co","last_synced_at":"2025-03-17T07:30:35.119Z","repository":{"id":41416688,"uuid":"99549724","full_name":"rsms/co","owner":"rsms","description":"A programming language in early development","archived":false,"fork":false,"pushed_at":"2020-03-13T23:59:16.000Z","size":2962,"stargazers_count":152,"open_issues_count":1,"forks_count":9,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-03-15T21:17:04.037Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://rsms.me/co/","language":"TypeScript","has_issues":false,"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/rsms.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":"2017-08-07T07:28:47.000Z","updated_at":"2025-02-14T05:02:11.000Z","dependencies_parsed_at":"2022-08-28T13:21:31.731Z","dependency_job_id":null,"html_url":"https://github.com/rsms/co","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rsms%2Fco","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rsms%2Fco/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rsms%2Fco/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rsms%2Fco/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rsms","download_url":"https://codeload.github.com/rsms/co/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243847888,"owners_count":20357462,"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-10-13T18:43:50.995Z","updated_at":"2025-03-17T07:30:34.648Z","avatar_url":"https://github.com/rsms.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# The Co programming language\n\nA programming language and optimizing compiler.\n\nThis is a project about:\n\n- Designing a practical, general-purpose programming language\n  - Statically typed, but the compiler does as much for you as possible\n  - Simple syntax, few built-ins\n  - More like Go than JavaScript\n- Optimizing compiler\n  - Input-language agnostic\n  - Intermediate Representation in SSA form\n  - Flexible target architecture (x86, amd64, vm, wasm, etc.)\n- Pipelined rather than progressive\n  - scanning source code into the parser\n  - parser passes AST chunks to the IR builder\n  - IR builder optimizes the chunks and then passes them to the code generator\n  - All this happens in a streaming fashion\n  - But each step can be easily separated and run independendly, making\n    it easy to inspect the state of the compiler at various steps of the\n    process.\n- Using no exernal libraries\n  - Portable (can run in a web browser)\n  - Simplify codebase\n  - Minimize risk of security concerns\n  - Maximize startup performance\n\n\n## Using\n\nRequirements: [nodejs](https://nodejs.org/) \u003e=8.0\n\nBuilding:\n- Setup: `npm install`\n- Build incrementally: `./build.js -w`\n- Run: `./dist/co.g`\n\nSome useful things:\n- Build debug version in one go: `./build.js`\n- Build optimized production version: `./build.js -O`\n- Run unit tests before main program: `./dist/co.g -test`\n- Run unit tests and exit: `./dist/co.g -test-only`\n- Print source diagnostics report and exit: `./dist/co.g -nobuild`\n- Live coding setup:\n  - Terminal 1: `./build.js -w`\n  - Terminal 2: `autorun dist/co.g`\n  - You'll need [`autorun`](https://github.com/rsms/autorun)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frsms%2Fco","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frsms%2Fco","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frsms%2Fco/lists"}