{"id":15101423,"url":"https://github.com/wirthx-compiler/wirthx","last_synced_at":"2025-08-02T11:32:43.077Z","repository":{"id":234748920,"uuid":"789455230","full_name":"wirthx-compiler/wirthx","owner":"wirthx-compiler","description":"Wirthx is a pascal compiler","archived":false,"fork":false,"pushed_at":"2025-07-12T21:31:01.000Z","size":648,"stargazers_count":4,"open_issues_count":16,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-12T23:34:19.088Z","etag":null,"topics":["compiler","llvm","pascal"],"latest_commit_sha":null,"homepage":"https://wirthx-compiler.github.io/","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wirthx-compiler.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,"zenodo":null}},"created_at":"2024-04-20T15:44:10.000Z","updated_at":"2025-07-03T19:48:53.000Z","dependencies_parsed_at":"2024-05-19T21:25:00.700Z","dependency_job_id":"dc47e87d-03d4-4611-b887-6518c22cd761","html_url":"https://github.com/wirthx-compiler/wirthx","commit_stats":{"total_commits":29,"total_committers":1,"mean_commits":29.0,"dds":0.0,"last_synced_commit":"45894dbb75eef0e43db2abd80f3d0a401432ac96"},"previous_names":["hisoka999/wirthx","wirthx-compiler/wirthx"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/wirthx-compiler/wirthx","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wirthx-compiler%2Fwirthx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wirthx-compiler%2Fwirthx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wirthx-compiler%2Fwirthx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wirthx-compiler%2Fwirthx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wirthx-compiler","download_url":"https://codeload.github.com/wirthx-compiler/wirthx/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wirthx-compiler%2Fwirthx/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268378965,"owners_count":24240907,"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","status":"online","status_checked_at":"2025-08-02T02:00:12.353Z","response_time":74,"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":["compiler","llvm","pascal"],"created_at":"2024-09-25T18:22:26.129Z","updated_at":"2025-08-02T11:32:43.069Z","avatar_url":"https://github.com/wirthx-compiler.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# wirthx\n\nWirthx is an experimental pascal compiler.\nThe language is named after Niklaus Wirth the creator of pascal.\n\n## Compiler\n\nThe compiler is based on llvm and will generate a native binary for the target plattform.\nFor now only `linux-x86-64` and `win64` are supported.\n\n## Current Restrictions\n\n\u003e [!WARNING]\n\u003e - only ascii characters are allowed in the source code\n\u003e - no support for `set` types\n\u003e - no support for `file` types with a sub type\n\u003e - no support for `packed` types\n\u003e - no support for `class` or `object` types\n\n### Options\n\n| **Option** \t   | **Values** \t | **Description**                                  \t                        |\n|----------------|--------------|---------------------------------------------------------------------------|\n| --run \u003cbr\u003e-r \t | \t            | Runs the compiled program                        \t                        |\n| --debug    \t   | \t            | Creates a debug build                            \t                        |\n| --release  \t   | \t            | Creates a release build                          \t                        |\n| --rtl      \t   | path       \t | sets the path for the rtl (run time library)     \t                        |\n| --output   \t   | path       \t | sets the output / build directory                \t                        |\n| --llvm-ir  \t   | \t            | Outputs the LLVM-IR to the standard error output \t                        |\n| --help         |              | Outputs the program help                                                  |\n| --version      |              | Prints the current version of the compiler                                |\n| --lsp          |              | runs the compiler in the language server mode                           \t |\n\n# Usage\n\n```sh\nwirthx testfiles/hello.pas\n```\n\n## Executing the compiler\n\nThe compiler will generate a native executable based on the program name defined in the program unit.\n\n```sh\nwirthx -c testfiles/hello.pas\n```\n\n# Examples\n\n## Hello World\n\n```pascal\nprogram test;\n\nbegin\n    Writeln('Hello World');\nend.\n```\n\n## Functions\n\n```pascal\nprogram test;\n\n    function addx(a : integer;b :integer): integer;\n    begin\n        addx := a + b;\n    end;\nvar\n    my_var : integer;\nbegin\n    my_var := addx(1,2);\n    Writeln(my_var);\nend.\n```\n\n## Procedures\n\n```pascal\nprogram test;\n\n    procedure my_inc(var value: integer);\n    begin\n        value := value + 1;\n    end;\nvar\n    my_var : integer := 10;\nbegin\n    my_inc(my_var);\n    Writeln(my_var);\nend.\n```\n\n## Records\n\n```pascal\nprogram test;\n\n    type Vec2 = record\n        x : int64;\n        y : int64;\n    end;\n\n    // pass the vector as a reference \n    procedure vec2_inc(var t : Vec2); \n    begin\n        t.x := t.x + 1;\n        t.y := t.y + 1;\n    end;\nvar\n    myvec : Vec2;\nbegin\n    myvec.x := 2;\n    myvec.y := 3;\n    vec2_inc(myvec);\nend.\n```\n\n## Conditions\n\n```pascal\nprogram test;\nvar\n    test : integer = 20;\nbegin\n    if test mod 2 then\n        writeln('20 is divisible by 2 without a reminder.');\nend.\n```\n\n## For - Loops\n\n```pascal\nprogram test;\nvar\n    i : integer;\nbegin\n    for i:= 1 to 20 do\n        writeln(i);\nend.\n```\n\n## While Loops\n\n```pascal\nprogram test;\nvar\n    loop_var : integer = 20;\nbegin\n    while loop_var \u003e 0 do\n    begin\n        writeln(loop_var);\n        loop_var := loop_var - 1;\n    end;\nend.\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwirthx-compiler%2Fwirthx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwirthx-compiler%2Fwirthx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwirthx-compiler%2Fwirthx/lists"}