{"id":13564534,"url":"https://github.com/titzer/virgil","last_synced_at":"2025-05-14T15:09:17.489Z","repository":{"id":37664600,"uuid":"41295289","full_name":"titzer/virgil","owner":"titzer","description":"A fast and lightweight native programming language","archived":false,"fork":false,"pushed_at":"2025-05-07T19:17:18.000Z","size":66914,"stargazers_count":1288,"open_issues_count":33,"forks_count":55,"subscribers_count":19,"default_branch":"master","last_synced_at":"2025-05-07T20:26:50.137Z","etag":null,"topics":["compiler","garbage-collection","native","programming-language","system-programming","systems","webassembly"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/titzer.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":"2015-08-24T09:45:58.000Z","updated_at":"2025-05-07T19:17:21.000Z","dependencies_parsed_at":"2025-04-29T19:32:12.452Z","dependency_job_id":null,"html_url":"https://github.com/titzer/virgil","commit_stats":{"total_commits":2776,"total_committers":35,"mean_commits":79.31428571428572,"dds":0.5061239193083573,"last_synced_commit":"bc547611416b5329f24baedeeebf2506485f65ff"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/titzer%2Fvirgil","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/titzer%2Fvirgil/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/titzer%2Fvirgil/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/titzer%2Fvirgil/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/titzer","download_url":"https://codeload.github.com/titzer/virgil/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254169983,"owners_count":22026217,"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":["compiler","garbage-collection","native","programming-language","system-programming","systems","webassembly"],"created_at":"2024-08-01T13:01:32.678Z","updated_at":"2025-05-14T15:09:14.012Z","avatar_url":"https://github.com/titzer.png","language":"Shell","funding_links":[],"categories":["Shell","Uncategorized","JVM语言","Other"],"sub_categories":["Uncategorized"],"readme":"# virgil: A Fast and Lightweight Systems Programming Language\n\n```\ndef main() {\n    System.puts(\"Virgil is fast and lightweight!\\n\");\n}\n```\n\nVirgil is a programming language designed for building lightweight high-performance systems.\nIts design blends functional and object-oriented programming paradigms for expressiveness and performance.\nVirgil's compiler produces optimized, standalone native executables, WebAssembly modules, or JARs for the JVM.\nFor quick turnaround in testing and debugging, programs can also be run directly on a built-in interpreter.\nIt is well-suited to writing small and fast programs with little or no dependencies, which makes\nit ideal for the lowest level of software systems.\nOn native targets, it includes features that allow building systems that talk directly to\nkernels, dynamically generate machine code, implement garbage collection, etc.\nIt is currently being used for virtual machine and programming language\nresearch, in particular the development of a next-generation WebAssembly virtual\nmachine, [Wizard](https://github.com/titzer/wizard-engine).\n\nThis repository includes the entire compiler, runtime system, some libraries,\ntests, documentation and supporting code for Virgil's various compilation\ntargets.\n\n## Language Design\n\nVirgil focuses on balancing these main features in a statically-typed language:\n\n  * Classes - for basic object-oriented programming\n  * Functions - for small-scale reuse of functionality\n  * Tuples - for efficient aggregation and uniform treatment of multi-argument functions\n  * Type parameters - for powerful and clean abstraction over types\n  * Algebraic data types - for easy building and matching of data structures\n\nFor more, read [this paper](https://static.googleusercontent.com/media/research.google.com/en//pubs/archive/41446.pdf).\nOr see the [tutorial](doc/tutorial/Overview.md).\nOr read up on [libraries](doc/tutorial/LibUtil.md).\n\n## Supported Targets\n\nVirgil can compile to native binaries for Linux or Darwin, to jar files for the\nJVM, or to WebAssembly modules. Linux binaries can run successfully under\nWindows using Window's Linux system call layer.\nThe compiler is naturally a cross-compiler, able to compile from any supported\nplatform to any other supported platform, so you need only be able to run on\none of these platforms in order to target any of the others.\n\n* x86-darwin : 32-bit Darwin kernels (MacOS)\n* x86-64-darwin : 64-bit Darwin kernels (MacOS)\n* x86-linux : 32-bit Linux kernels\n* x86-64-linux : 64-bit Linux kernels\n* jar : JAR files for the Java Virtual Machine\n* wasm : WebAssembly module for any Wasm engine\n\n## Implementation\n\nVirgil is fully self-hosted: its entire compiler and runtime system is\nimplemented in Virgil.\nIt was originally designed as a language for embedded systems, particularly\nmicrocontrollers, but now supports more mainstream targets.\nThe compiler includes sophisticated whole-program optimizations that achieve\ngreat performance and small binaries.\nNative binaries compiled from your programs can be as small as a few hundred\nbytes in size and consume just kilobytes of memory at runtime.\nYou can learn more in the [Implementation Guide](doc/impl/README.md).\n\n## Documentation\n\nThe most up-to-date documentation is, as always, this repository!\nLearn how to [get started](start/README.md) using Virgil and browse the [tutorial](doc/tutorial/Overview.md), where many [example](doc/tutorial/examples) programs exist.\n\n### Research Papers\n\nSix research papers have been published on Virgil.\n\n* Bradley Wei Jie Teo and Ben L. Titzer. [Unboxing Virgil ADTs for Fun and Profit](https://dl.acm.org/doi/10.1145/3694848.3694857). In Proceedings of the Workshop Dedicated to Jens Palsberg on Occasion of of His 60th Birthday (JENSFEST 24). Pasadena, CA. October 2024.\n\n* Ben L. Titzer. [Harmonizing Classes, Functions, Tuples and Type Parameters in Virgil III](https://dl.acm.org/doi/10.1145/2491956.2491962) \\[[pdf](https://static.googleusercontent.com/media/research.google.com/sv//pubs/archive/41446.pdf)\\]. In\nProceedings of the ACM Conference on Programming Language Design and Implementation\n(PLDI '13). San Diego, CA. June 2013.\n\n* Stephen Kou and Jens Palsberg. [From OO to FPGA: Fitting round objects into square hardware](https://dl.acm.org/doi/10.1145/1869459.1869470)? \\[[pdf](https://web.cs.ucla.edu/~palsberg/paper/oopsla10.pdf)\\] In\nProceedings of the ACM Conference on Object-Oriented Programming Systems, Languages and\nApplications (OOPSLA '10). Reno, Nevada, 2010.\n\n* Ben L. Titzer and Jens Palsberg. Vertical Object Layout and Compression for Fixed Heaps. In\nSemantics and Algebra Specification. Pp. 376-408. 2009.\n\n* Ben L. Titzer and Jens Palsberg. [Vertical Object Layout and Compression for Fixed Heaps](https://dl.acm.org/doi/10.1145/1289881.1289914) \\[[pdf](https://web.cs.ucla.edu/~palsberg/paper/cases07.pdf)\\]. In\nProceedings of the International Conference on Compilers, Architecture, and Synthesis for\nEmbedded Systems (CASES ’07). Salzburg, Austria. October 2007.\n\n* Ben L. Titzer. [Virgil: Objects on the Head of a Pin](https://dl.acm.org/doi/10.1145/1167473.1167489) \\[[pdf](https://escholarship.org/content/qt13r0q4fc/qt13r0q4fc.pdf)\\]. In Proceedings of the 21 st Annual\nConference on Object-Oriented Systems, Languages, and Applications (OOPSLA '06). October 2006.\n\n## License\n\nLicensed under the Apache License, Version 2.0. ([rt/LICENSE](rt/LICENSE) or https://www.apache.org/licenses/LICENSE-2.0)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftitzer%2Fvirgil","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftitzer%2Fvirgil","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftitzer%2Fvirgil/lists"}