{"id":19645417,"url":"https://github.com/corani/silver-octo-sniffle","last_synced_at":"2025-04-28T14:32:49.034Z","repository":{"id":65596448,"uuid":"588547900","full_name":"corani/silver-octo-sniffle","owner":"corani","description":"Just playing around with generating LLVM IR in Go","archived":false,"fork":false,"pushed_at":"2025-04-27T14:55:15.000Z","size":605,"stargazers_count":2,"open_issues_count":2,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-27T15:44:37.065Z","etag":null,"topics":["go","golang","llvm","llvm-ir"],"latest_commit_sha":null,"homepage":"","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/corani.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}},"created_at":"2023-01-13T11:44:35.000Z","updated_at":"2025-03-18T05:50:40.000Z","dependencies_parsed_at":"2023-10-20T17:04:53.863Z","dependency_job_id":"9db48e91-9ee7-496c-be71-d6aa7849728f","html_url":"https://github.com/corani/silver-octo-sniffle","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/corani%2Fsilver-octo-sniffle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/corani%2Fsilver-octo-sniffle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/corani%2Fsilver-octo-sniffle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/corani%2Fsilver-octo-sniffle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/corani","download_url":"https://codeload.github.com/corani/silver-octo-sniffle/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251330512,"owners_count":21572296,"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":["go","golang","llvm","llvm-ir"],"created_at":"2024-11-11T14:33:55.218Z","updated_at":"2025-04-28T14:32:44.021Z","avatar_url":"https://github.com/corani.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![codecov](https://codecov.io/gh/corani/silver-octo-sniffle/branch/master/graph/badge.svg?token=MZ7S8SGD7X)](https://codecov.io/gh/corani/silver-octo-sniffle)\n\n# Silver Octo Sniffle\n\nThis started out as playing around a bit with generating LLVM IR in Go and has since devolved\ninto an attempt to implement a full [Oberon](http://oberon07.com/) compiler.\n\nThe name is just the random name that GitHub picked, if this results into something decent, I'll \neventually rename the repo to something more memorable.\n\n## Usage \n\nThis project generates LLVM IR and subsequently compiles it with Clang. You'll need to have some\nversion of it installed. I'm using version 11 on Linux (X64) and version 15 on Android (ARM64) to\ntest it, presumably older versions will work as well as I'm not doing anything fancy. \n\nThe CLI is not actively tested at the moment, I'm only running the golden tests (see below). But\nthe following should work:\n\n```bash\n$ ./build.sh -b\n\n$ bin/compiler -src=test.obr\n$ bin/test\n```\n\n## Testing \n\nTo make testing easier, I'm using golden tests in the [test](test/) folder. They're saved as\nMarkdown files for easy viewing on GitHub and contain the source code with the expected tokens,\nAST, IR and runtime output. The tests are executed together with the unit tests:\n\n```bash\n$ ./build.sh -t\n```\n\nTo add a new test, simply copy one of the existing files and change the source code section. By\nrunning:\n\n```bash\n$ ./build.sh -tr\n```\n\nyou can record the output. Check the output in the new test file and make any necessary code\nchanges until it's correct, then move on. \n\n## CI/CD \n\nI'm running `golangci-lint` as a GitHub Action to statically check the code. This can be run\nlocally as well:\n\n```bash\n$ ./build.sh -l\n```\n\nThere's also a GitHub Action that will run the tests and upload the test coverage to CodeCov.\n\nRenovate is setup to keep the dependencies up-to-date.\n\nOnce this is in a usable state, I'll add a GoReleaser Action to create releases.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcorani%2Fsilver-octo-sniffle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcorani%2Fsilver-octo-sniffle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcorani%2Fsilver-octo-sniffle/lists"}