HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
titzer
virgil
Shell2016–2026
titzer / virgil

virgil

A fast and lightweight native programming language

16Distinct people
41Mentions
1Explicit recommenders
1.4KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

A fast and lightweight native programming language

GitHub

Where it is used

No documented product use was verified in the last source check.

What people are saying

Terrific. Some really great ergonomic features. After a quick scan: -- Invoking methods with tuples. https://github.com/titzer/virgil/blob/master/doc/tutorial/Tu... Just…

specialist used a recommendation phrase. One indexed comment matches. This is a phrase match, not a verdict.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 5:04:57 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year41 dated mentions

Observed mentions: 2016-10-07 09:40:55 UTC to 2026-01-24 22:23:15 UTC.

0369122016-01-01 00:00:00 UTC to 2017-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments20162017-01-01 00:00:00 UTC to 2018-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 3 mentions; 0 submissions, 3 comments2021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 9 mentions; 1 submissions, 8 comments20212022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 12 mentions; 2 submissions, 10 comments2023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 7 mentions; 3 submissions, 4 comments2025-01-01 00:00:00 UTC to 2026-01-01 00:00:00 UTC (exclusive): 4 mentions; 1 submissions, 3 comments2026-01-01 00:00:00 UTC to 2027-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments. Incomplete calendar period.2026*

* An incomplete calendar period is marked with an outlined bar. Its count is not directly comparable with a full period.

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20162016-01-01 00:00:00 UTC2017-01-01 00:00:00 UTC202
20172017-01-01 00:00:00 UTC2018-01-01 00:00:00 UTC000
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC000
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC101
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC303
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC918
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC12210
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC202
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC734
20252025-01-01 00:00:00 UTC2026-01-01 00:00:00 UTC413
2026 (partial)2026-01-01 00:00:00 UTC2027-01-01 00:00:00 UTC101

What Hacker News says

41 sources
90s_dev·Jun 29, 2025Submission

Ask HN: Languages Designed for WASM?

Hi everyone. I'm on a hunt to find all languages that are designed specifically to compile to WASM. I have a project (hram.dev -- hand-rolled assembly machine) that I want to build to share the joy of unwrapping a new computer in the 80s/90s that boots up with an editor so that you can program it directly in assembly, and I plan to use wamr+llvm for near-native performance while still having isolation so that you can mess things up. Obviously the ability to write WAT directly will be fundamental and certainly fun, but I am looking for higher level languages that make it slightly less convenient to write, to bundle with it internally so that users have at least two choices of how to write code. Do you know of any other languages designed specifically for wasm? These are all I could find: Most likely: curlywas (https://github.com/exoticorn/
Read the rest
curlywas) -- c-like but very low-level; seems very complete; rust impl; mit license; short but seemingly thorough docs? wa (https://github.com/wa-lang/wa) -- go-like, not clear how high/low level it is, thorough docs, seems promising, agpl license, lots of mandarin in docs virgil (https://github.com/titzer/virgil) -- ruby-like? gc; cant find license; last commit 3 hours ago; thorough docs but all in md files in repo assemblyscript (https://github.com/AssemblyScript/assemblyscript) -- typescript-like; apache 2 license, minimal runtime with gc; implemented in js walt (https://github.com/ballercat/walt) -- JavaScript-like made for wasm, 25 contributors! decent looking docs, might actually be usable! most commits 7 years ago but last commit 3 years ago though, mit license onyx (https://wasmer.io/posts/onyxlang-powered-by-wasmer, https://github.com/onyx-lang/onyx) -- ocaml-like? recent activity, full docs, bsd license, not sure if it has lower level capabilities or how much the higher level features cost at runtime or build time waforth (https://github.com/remko/waforth) -- forth for wasm! upside is that its forth, downside is that its forth; mit license; great docs; seemingly inefficient due to constant lookups? Less likely: thinscript (https://github.com/evanw/thinscript) -- js-like with macros; abandoned 9 years ago; not yet licensed wase (https://github.com/area9innovation/wase) -- C-like syntax but still wasm-like, not super recent but not super old, only a few contributors, not sure how complete it is but its docs give a feeling of being mostly-complete, MIT license wam (https://github.com/kanaka/wam) -- wasm macro preprocessor, just one guy, last commit 7 years ago, very few built in macros, mozilla license (???) wah (https://github.com/tmcw/wah) -- wasm but with infix, doesn't seem extensible with macros, two contributors, last commit 8 years ago, eclipse license (???) Honorable mentions: mini-c (https://github.com/maierfelix/mini-c) -- C to wasm compiler, seemingly abandoned 8 years ago, not sure how complete it is c4wa (https://github.com/kign/c4wa) -- c to wasm compiler, no activity in 3 years, no license, written in java
6 points · Open discussion
> Implicit numeric conversion is terrible. It's bad if it alters values (e.g. rounding). Promotion from one number representation to another (as long as it preserves values) isn't bad. This is trickier than it might seem, but Virgil has a good take on this (https://github.com/titzer/virgil/blob/master/doc/tutorial/Nu...). Essentially, it only implicitly promotes values in ways that don't lose numeric information and thus are always reversible. In the example, Virgil won't let you pass "1000.00" to an integer argument, but will let you pass "100" to the double argument.
In Matt Godbolt sold me on Rust by showing me C++
Virgil solved this a little differently. The initialization expressions for fields (outside of constructors) as well as implicit assignment of constructor parameters to fields happens before super constructor calls. Such initialization expressions cannot reference "this"--"this" is only available in _constructor bodies_. Initializing fields before calling super and then the chaining of super calls guarantees the whole chain of super constructor calls will finish before entering the body of a constructor, and all fields will be initialized. Thus by construction, virtual methods invoked on "this" won't see uninitialized fields. https://github.com/titzer/virgil/blob/master/doc/tutorial/Cl...
In I have no constructor, and I must initialize
For (2) Virgil has several features that allow you to layout memory with various levels of control. I assume you meaning "array of structs", and you can do that with arrays of tuples, which will naturally be flattened and normalized based on the target (i.e. will be array-of-structs on native targets). You can define byte-exact layouts[1] (mostly for interfacing with other software and parsing binary formats), unbox ADTs, and soon you can even control the exact encoding of ADTs. Virgil is GC'd. [1] https://github.com/titzer/virgil/blob/master/doc/tutorial/La...
In Garbage collection for systems programmers (2023)
Virgil doesn't use frame pointers. If you don't have dynamic stack allocation, the frame of a given function has a fixed size can be found with a simple (binary-search) table lookup. Virgil's technique uses an additional page-indexed range that further restricts the lookup to be a few comparisons on average (O(log(# retpoints per page)). It combines the unwind info with stackmaps for GC. It takes very little space. The main driver is in (https://github.com/titzer/virgil/blob/master/rt/native/Nativ... the rest of the code in the directory implements the decoding of metadata. I think frame pointers only make sense if frames are dynamically-sized (i.e. have stack allocation of data). Otherwise it seems weird to me that a dynamic mechanism is used when a static mechanism would suffice; mostly because no one agreed on an ABI for the metadata e
Read the rest
ncoding, or an unwind routine. I believe the 1-2% measurement number. That's in the same ballpark as pervasive checks for array bounds checks. It's weird that the odd debugging and profiling task gets special pleading for a 1% cost but adding a layer of security gets the finger. Very bizarre priorities.
In The return of the frame pointers
JavaScript handles the "no identity hash" with WeakMap and WeakSet, which are language built-ins. For Virgil, I chose to leave out identity hashes and don't really regret it. It keeps the language simple and the separation clear. HashMap (entirely library code, not a language wormhole) takes the hash function and equality function as arguments to the constructor. [1] https://github.com/titzer/virgil/blob/master/lib/util/Map.v3 This is partly my style too; I try to avoid using maps for things unless they are really far flung, and the things that end up serving as keys in one place usually end up serving as keys in lots of other places too.
In JEP 450: Compact Object Headers

Showing the 15 most recent of 41 sources. Enable JavaScript to search and browse every indexed mention.

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.