Zurück zum Ranking

titzer/virgil

Shell

A fast and lightweight native programming language

compilerprogramming-languagewebassemblynativegarbage-collectionsystem-programmingsystems
Sterne-Wachstum
Sterne
1.4k
Forks
61
Wochenwachstum
Issues
28
5001k
Sept. 2015Apr. 2019Dez. 2022Juli 2026
README

virgil: A Fast and Lightweight Systems Programming Language

def main() {
    System.puts("Virgil is fast and lightweight!\n");
}

Virgil is a programming language designed for building lightweight high-performance systems. Its design blends functional and object-oriented programming paradigms for expressiveness and performance. Virgil's compiler produces optimized, standalone native executables, WebAssembly modules, or JARs for the JVM. For quick turnaround in testing and debugging, programs can also be run directly on a built-in interpreter. It is well-suited to writing small and fast programs with little or no dependencies, which makes it ideal for the lowest level of software systems. On native targets, it includes features that allow building systems that talk directly to kernels, dynamically generate machine code, implement garbage collection, etc. It is currently being used for virtual machine and programming language research, in particular the development of a next-generation WebAssembly virtual machine, Wizard.

This repository includes the entire compiler, runtime system, some libraries, tests, documentation and supporting code for Virgil's various compilation targets.

Language Design

Virgil focuses on balancing these main features in a statically-typed language:

  • Classes - for basic object-oriented programming
  • Functions - for small-scale reuse of functionality
  • Tuples - for efficient aggregation and uniform treatment of multi-argument functions
  • Type parameters - for powerful and clean abstraction over types
  • Algebraic data types - for easy building and matching of data structures

For more, read this paper. Or see the tutorial. Or read up on libraries.

Supported Targets

Virgil can compile to native binaries for Linux or Darwin, to jar files for the JVM, or to WebAssembly modules. Linux binaries can run successfully under Windows using Window's Linux system call layer. The compiler is naturally a cross-compiler, able to compile from any supported platform to any other supported platform, so you need only be able to run on one of these platforms in order to target any of the others.

  • x86-darwin : 32-bit Darwin kernels (MacOS)
  • x86-64-darwin : 64-bit Darwin kernels (MacOS)
  • x86-linux : 32-bit Linux kernels
  • x86-64-linux : 64-bit Linux kernels
  • jar : JAR files for the Java Virtual Machine
  • wasm : WebAssembly module for any Wasm engine

Implementation

Virgil is fully self-hosted: its entire compiler and runtime system is implemented in Virgil. It was originally designed as a language for embedded systems, particularly microcontrollers, but now supports more mainstream targets. The compiler includes sophisticated whole-program optimizations that achieve great performance and small binaries. Native binaries compiled from your programs can be as small as a few hundred bytes in size and consume just kilobytes of memory at runtime. You can learn more in the Implementation Guide.

Documentation

The most up-to-date documentation is, as always, this repository! Learn how to get started using Virgil and browse the tutorial, where many example programs exist.

Research Papers

Six research papers have been published on Virgil.

License

Licensed under the Apache License, Version 2.0. (rt/LICENSE or https://www.apache.org/licenses/LICENSE-2.0)

Ähnliche Repositories
vercel/next.js

The React Framework

JavaScriptnpmMIT Licensereactserver-rendering
nextjs.org
141.1k31.5k
rust-lang/rust

Empowering everyone to build reliable and efficient software.

Rustcrates.ioApache License 2.0rustcompiler
rust-lang.org
114.8k15.4k
sveltejs/svelte

web development for the rest of us

JavaScriptnpmMIT Licensetemplateui
svelte.dev
87.7k5k
webpack/webpack

A bundler for javascript and friends. Packs many modules into a few bundled assets. Code Splitting allows for loading parts of the application on demand. Through "loaders", modules can be CommonJs, AMD, ES6 modules, CSS, Images, JSON, Coffeescript, LESS, ... and your custom stuff.

JavaScriptnpmMIT Licensewebpackjavascript
webpack.js.org
65.8k9.4k
FuelLabs/sway

🌴 Empowering everyone to build reliable and efficient smart contracts.

Rustcrates.ioApache License 2.0swaylanguage
docs.fuel.network/docs/sway/
61.6k5.4k
gatsbyjs/gatsby

React-based framework with performance, scalability, and security built in.

JavaScriptnpmMIT Licensegatsbystatic-site-generator
gatsbyjs.com
56k10.2k
typst/typst

A markup-based typesetting system that is powerful and easy to learn.

Rustcrates.ioApache License 2.0typesettingcompiler
typst.app
55k1.6k
JetBrains/kotlin

The Kotlin Programming Language.

Kotlinkotlinprogramming-language
kotlinlang.org
53.2k6.4k
parcel-bundler/parcel

The zero configuration build tool for the web. 📦🚀

JavaScriptnpmMIT Licensemodule-bundlerbuild-tool
parceljs.org
44k2.3k
babel/babel

🐠 Babel is a compiler for writing next generation JavaScript.

TypeScriptnpmMIT Licensebabeljavascript
babel.dev
44k5.9k
ziglang/zig

Moved to Codeberg

ZigMIT Licensecompilerzig
ziglang.org/news/migrating-from-github-to-codeberg/
43.3k3.1k
evanw/esbuild

An extremely fast bundler for the web

GoGo ModulesMIT Licensetypescriptminifier
esbuild.github.io
40k1.3k