{"id":22087433,"url":"https://github.com/nwmarino/artus","last_synced_at":"2026-04-29T11:02:16.264Z","repository":{"id":265777628,"uuid":"882533775","full_name":"nwmarino/artus","owner":"nwmarino","description":"a programming language","archived":false,"fork":false,"pushed_at":"2024-11-30T21:32:51.000Z","size":455,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-23T22:35:58.137Z","etag":null,"topics":["compiler","language","llvm"],"latest_commit_sha":null,"homepage":"https://github.com/nwmarino/artus","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nwmarino.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-03T03:07:55.000Z","updated_at":"2024-12-05T01:18:24.000Z","dependencies_parsed_at":"2024-11-30T22:37:13.191Z","dependency_job_id":"41ea45fd-364b-4db1-bdd2-b1c3573f9af2","html_url":"https://github.com/nwmarino/artus","commit_stats":null,"previous_names":["nwmarino/artus"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nwmarino/artus","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nwmarino%2Fartus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nwmarino%2Fartus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nwmarino%2Fartus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nwmarino%2Fartus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nwmarino","download_url":"https://codeload.github.com/nwmarino/artus/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nwmarino%2Fartus/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32422532,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T06:29:02.080Z","status":"ssl_error","status_checked_at":"2026-04-29T06:29:00.631Z","response_time":110,"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":["compiler","language","llvm"],"created_at":"2024-12-01T02:05:31.442Z","updated_at":"2026-04-29T11:02:16.245Z","avatar_url":"https://github.com/nwmarino.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# artus\n\nArtus is a statically-typed toy programming language with your typical\nprogramming paradigms. It supports programs across multiple source files by the\nway of a modular package system, and compiles down to most instruction sets\nthrough LLVM.\n\nArtus uses CMake (version 3.31) version to produce an executable, and requires linking\nagainst LLVM 18.1.8-4.\n\nTo fully compile and link source programs, the compiler shells out to `clang` and\nthus requires it on the system if binaries are desired without an external linker.\n\n## Types\n| Identifier | Name | Example |\n|------------|------|---------|\n| `bool` | boolean | `0`, `1`\n| `char` | char/8-bit | `'a'`, `256`\n| `i32` | 32-bit signed | `2^31`\n| `i64` | 64-bit signed | `2^63`\n| `u8` | 8-bit unsigned | `2^8`\n| `u32` | 32-bit unsigned | `2^32`\n| `u64` | 64-bit unsigned | `2^64`\n| `str` | string | `\"abc\"`\n| `f64` | floating point | `3.14`\n\n## Operators\n| Operator | Precedence | Use |\n|----------|------------|-----|\n| `=` `+=` `-=` `*=` `/=` | 1 | Assignment\n| `\u0026\u0026` `\\|\\|` `^^` | 2 | Logical Comparison (and, or, xor)\n| `==` `!=` | 3 | Equality Comparison\n| `\u003c` `\u003e` `\u003c=` `\u003e=` | 4 | Inequalities\n| `+` `-` | 5 | Additive Ops\n| `*` `/` | 6 | Multiplicative Ops\n| `#` `\u0026` `!` `-` | 7 | Unary Ops\n\n## std\n\n### io\n\nimport with: `import std::io`\n\n```go\n// Prints string \u003cs\u003e\nfn @print(s: #str) -\u003e void\n\n// Prints string \u003cs\u003e with a newline\nfn @println(s: #str) -\u003e void\n\n// Reads a string into pointer s\nfn @read_str(s: #str) -\u003e void\n```\n\n### memory\nimport with: `import std::memory`\n\n```go\n// allocate memory\nfn @malloc(size: i32) -\u003e #void\n\n// free allocated memory\nfn @free(ptr: #void) -\u003e void\n```\n\n## Packages\n```go\n// main.artus\nimport utils\n\nfn @main() -\u003e i64 {\n  ret @foo\n}\n\n// utils.artus\n\nfn @foo() -\u003e i64 {\n  ret 0\n}\n```\n\n## Pointers\n```go\n/// ptr address-of\nmut x: i64 = 5\nmut y: #i64 = \u0026x\n\n/// ptr dereference\n#y = 0\n```\n\n## Arrays\n```go\n// array initialization\nmut nums: i64[3] = [0, 1, 2]\n\n// array access\nfix a: i64 = nums[0]\n```\n\n## Functions\n```\nfunction-decl: \n        'fn' '@' \u003cidentifier\u003e '(' [param-list] ')' '-\u003e' [type] \u003cstmt\u003e\n      | 'fn' '@' \u003cidentifier\u003e '(' [param-list] ')' \u003cstmt\u003e\n      | 'fn' '@' \u003cidentifier\u003e '-\u003e' [type] \u003cstmt\u003e\n      | 'fn' '@' \u003cidentifier\u003e \u003cstmt\u003e\n\nparam-list: \n        param [',' param-list]\n\nparam:\n        'mut' \u003cidentifier\u003e ':' [type]\n      | \u003cidentifier\u003e ':' [type]\n\ntype:   \u003cidentifier\u003e\n```\n```go\n// main\nfn @main() -\u003e i64 { ... }\n\n// otherwise\nfn @foo(a: i64, mut b: i64[2]) -\u003e i64 { ... }\n\n// function calls, empty:\n@foo\n\n// function calls, with arguments\n@foo(1, [2, 3])\n```\n\n## Variables\n```\nvar-decl:\n        'fix' \u003cidentifier\u003e ':' [type] '=' \u003cexpr\u003e\n      | 'mut' \u003cidentifier\u003e ':' [type]\n      | 'mut' \u003cidentifier\u003e ':' [type] '=' \u003cexpr\u003e\n\ntype:   \u003cidentifier\u003e\n```\n```go\n// immutable assignment\nfix x: i64 = 0\n\n// mutable assignment\nmut y: i64 = 1\n```\n\n## Control Flow\n\n### If Statements\n```\nif-stmt:\n        'if' \u003cexpr\u003e \u003cstmt\u003e\n      | 'if' \u003cexpr\u003e \u003cstmt\u003e 'else' \u003cstmt\u003e\n```\n```go\nif cond {\n    ...\n}\n\nif cond {\n    ...\n} else {\n    ...\n}\n\nif cond {\n    ...\n} else if cond {\n    ...\n} else {\n    ...\n}\n```\n\n### Loops\n\n#### While Loops\n```\nwhile-stmt:\n        'while' \u003cexpr\u003e \u003cstmt\u003e\n```\n```go\nwhile cond {\n    ...\n}\n```\n\n#### Until Loops\n```\nuntil-stmt:\n        'until' \u003cexpr\u003e \u003cstmt\u003e\n```\n```go\nuntil cond {\n    ...\n}\n```\n\n### Match Statements\n```\nmatch-stmt:\n        'match' \u003cexpr\u003e '{' [match-case-list] '}'\n\nmatch-case-list:\n        match-case [',' match-case-list]\n\nmatch-case:\n        case-stmt\n      | default-stmt\n\ncase-stmt:\n        \u003cexpr\u003e =\u003e \u003cstmt\u003e\n\ndefault-stmt:\n        '_' =\u003e \u003cstmt\u003e\n```\n```go\nfix x: i64 = 0\nmatch x {\n    0 =\u003e ...,\n    1 =\u003e { ... },\n    _ =\u003e { ... },\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnwmarino%2Fartus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnwmarino%2Fartus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnwmarino%2Fartus/lists"}