{"id":20483435,"url":"https://github.com/styczynski/instant-compiler-go","last_synced_at":"2026-05-11T09:34:13.711Z","repository":{"id":45872087,"uuid":"424354469","full_name":"styczynski/instant-compiler-go","owner":"styczynski","description":null,"archived":false,"fork":false,"pushed_at":"2023-12-11T13:26:26.000Z","size":98685,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"compat","last_synced_at":"2025-01-16T04:22:39.113Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/styczynski.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,"governance":null}},"created_at":"2021-11-03T19:28:32.000Z","updated_at":"2023-03-04T07:45:36.000Z","dependencies_parsed_at":"2023-12-11T14:35:24.044Z","dependency_job_id":"1a457be4-75ba-4f35-b157-93e6b13b57d7","html_url":"https://github.com/styczynski/instant-compiler-go","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/styczynski%2Finstant-compiler-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/styczynski%2Finstant-compiler-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/styczynski%2Finstant-compiler-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/styczynski%2Finstant-compiler-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/styczynski","download_url":"https://codeload.github.com/styczynski/instant-compiler-go/tar.gz/refs/heads/compat","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242058203,"owners_count":20065066,"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-11-15T16:17:21.334Z","updated_at":"2026-05-11T09:34:08.675Z","avatar_url":"https://github.com/styczynski.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Instant compiler\n\n[![Build test release](https://github.com/styczynski/instant-compiler-go/actions/workflows/release.yml/badge.svg)](https://github.com/styczynski/instant-compiler-go/actions/workflows/release.yml)\n\nThis project uses [go-project-blueprint](https://github.com/MartinHeinz/go-project-blueprint) as a starter project so\nthe original Dockerfile/go.mod and config comes from this repository.\n\nI also utilize customized [chroma](https://github.com/alecthomas/chroma) code to provide syntax colouring.\n\nThe project itself implements Hindley-Milder typesystem, which were based on various reference papers and implemeneted by me so there's a little change the core code will be similar to what is seen in this reference documents.\n\nThe code itself is mine although orignally it was written for Latte compilation.\n\n## Project strcture\n\n- compiler - core compiler features\n- errors - error handling\n- compiler_pipeline - Compiler pipeline code (this folder contains all blocks like runner, compiler, type checker connected)\n- events_collector - compiler async event colelction system\n- events_utils - minor utilities for event collection\n- generic_ast - AST implementation (the specification allows parsing and inference algotether)\n- parser - parser implemetation\n- input_reader - input pipeline abstraction\n- printer - pretty-printing tilities\n- runner - compiled code runner and tester\n- type_checker - extended-HM inference implementation\n\n## Building\n\nTo build the project simply call:\n\n```bash\n    $ make\n```\n\n## Interactive CLI\n\nYou can run interactive CLI by typing:\n```bash\n   $ ./insc_jvm shell\n```\n\nThe interactive shell allows user to provide input program and realtime compiler output as well as running program output.\n\n## Running\n\nYou can test bulk of files using glob:\n\n```bash\n    $ ./insc_jvm --backend jvm './test/*.ins'\n```\n\nOr compile one at the time:\n\n```bash\n    $ ./insc_jvm --backend llvm ./tests/a.ins\n```\n\nThe compiler atomatically detects `*.valid_output` files and runs compiled program agains them to check for output correctnes.\nThat means thatyou can easily test the executable. You just have to copy all `*.valid_output` files to the specific directory and use './dir/\\*.some_extension` glob for compiler input.\nThe extension is configrable by using `--runner-test-extension` parameter. Please type `./insc_jvm --help` or `./insc_llvm --help` to get more info.\n\nFor example if you wish to test all files in `tests/` diretory you can execute the following command:\n```bash\n    $ ./insc_llvm --runner-test-extension output \"./tests/*.ins\"\n    $ ./insc_jvm --runner-test-extension output \"./tests/*.ins\"\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstyczynski%2Finstant-compiler-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstyczynski%2Finstant-compiler-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstyczynski%2Finstant-compiler-go/lists"}