{"id":39598646,"url":"https://github.com/ammarbinfaisal/sahl","last_synced_at":"2026-01-18T07:50:44.846Z","repository":{"id":63537108,"uuid":"517223171","full_name":"ammarbinfaisal/sahl","owner":"ammarbinfaisal","description":"a programming language with channels and coroutines/threads","archived":false,"fork":false,"pushed_at":"2024-06-22T04:13:15.000Z","size":4938,"stargazers_count":9,"open_issues_count":30,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-06-22T16:14:44.123Z","etag":null,"topics":["bytecode","compiler","language","vm"],"latest_commit_sha":null,"homepage":"","language":"C","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/ammarbinfaisal.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","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":"2022-07-24T04:09:00.000Z","updated_at":"2024-06-22T04:13:18.000Z","dependencies_parsed_at":"2023-12-07T16:39:16.899Z","dependency_job_id":"7d5d4b92-c3f7-41d1-988d-29cda8b15a30","html_url":"https://github.com/ammarbinfaisal/sahl","commit_stats":null,"previous_names":["ammarbinfaisal/sahl"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ammarbinfaisal/sahl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ammarbinfaisal%2Fsahl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ammarbinfaisal%2Fsahl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ammarbinfaisal%2Fsahl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ammarbinfaisal%2Fsahl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ammarbinfaisal","download_url":"https://codeload.github.com/ammarbinfaisal/sahl/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ammarbinfaisal%2Fsahl/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28533196,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T00:39:45.795Z","status":"online","status_checked_at":"2026-01-18T02:00:07.578Z","response_time":98,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["bytecode","compiler","language","vm"],"created_at":"2026-01-18T07:50:44.047Z","updated_at":"2026-01-18T07:50:44.828Z","avatar_url":"https://github.com/ammarbinfaisal.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sahl\n\n![badge](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/ammarbinfaisal/2bc57fe31c6d742b25defe3549e78433/raw/tests.json)\n![badge](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/ammarbinfaisal/2bc57fe31c6d742b25defe3549e78433/raw/aot.json)\n![badge](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/ammarbinfaisal/2bc57fe31c6d742b25defe3549e78433/raw/go.json)\n\na programming language with channels and coroutines\n\n## meaning\n\nsahl means easy. \u003cs\u003eThis is the easiest statically typed language I could come up with.\u003c/s\u003e It could be called easy before but it has become bloated now as I am adding or planning to add all sort of stuff.\n\n## usage\n\n- install rust, llvm, clang\n- `make` to compile the compiler and the virtual machine\n- then use **./sahlc -o exe code.sahl** to compile a sahl file to native code\n- or use **./run_byte.sh code.sahl** to run a sahl file on the virtual machine\n\n## features\n\n- c interop\n- type inference\n- garbage collected\n- haskellesque type constructors\n- green threads (only in vm)\n- channels\n\n## docs\n\n[DOCS.md](DOCS.md)\n\n## vscode extension\n\n### install\n\n```bash\ncp -r ext ~/.vscode/extensions/sahl\n```\n\n**only supports syntax highlighting for now**\n\n## history\n\nInitially I made the virtual machine in rust. It was slow so I rewrote the codegen in rust to emit bytes instead of rust enums/structs and then run the bytecode on a virtual machine I wrote in c. Since, the language is statically typed I thought compiling it to native code would be a nice idea so I started writing that using llvm but paused. I also wrote [`sahl_aot.go`](https://github.com/ammarbinfaisal/sahl/blob/828d8bef82ec3a40083cd938c6ec40deef4355f7/sahl_aot.go) to convert the bytecode to assembly but stopped. I wrote [x86 codegen](https://github.com/ammarbinfaisal/sahl/blob/e9b49e7f2993197614458ea86f697bda1f120d47/frontend/src/asm.rs) which operated on the ast. Abandoned that soon after. Then reorganized the source to use [three-addr-code](https://github.com/ammarbinfaisal/sahl/pull/40) and a register based vm. After that picked up native codegen using llvm from the three-addr-code. \u003cbr/\u003e\nRight now there is a virtual machine, native code generation with llvm and transpilation to go.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fammarbinfaisal%2Fsahl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fammarbinfaisal%2Fsahl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fammarbinfaisal%2Fsahl/lists"}