HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
WebAssembly
reference-types
WebAssembly2018–2024
WebAssembly / reference-types · Archived

reference-types

Proposal for adding basic reference types (anyref)

13Distinct people
15Mentions
0Explicit recommenders
170GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Proposal for adding basic reference types (anyref)

GitHub

Where it is used

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

What people are saying

No recommendation phrase was found in the indexed comments.

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

Also in these discussions

Mentioned in the same Hacker News threads. That is not proof they are substitutes.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 11:56:56 AM 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 year15 dated mentions

Observed mentions: 2018-03-14 16:07:16 UTC to 2024-04-14 06:26:40 UTC.

0123452018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 4 mentions; 0 submissions, 4 comments20182019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 5 mentions; 0 submissions, 5 comments2020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments20212022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2024

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
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC404
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC505
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC101
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC202
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC101
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC101
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC101

What Hacker News says

15 sources
AFAIK GC is (mostly) irrelevant for "direct DOM access", you would rather want to hop into the following rabbit hole: - reference types: https://github.com/WebAssembly/reference-types/blob/master/p... - interface types (inactive): https://github.com/WebAssembly/interface-types/blob/main/pro... - component model: https://github.com/WebAssembly/component-model If this looks like a hot mess, that's because it is. Compared to that, the current solution to go through a Javascript shim doesn't look too bad IMHO.
In Bringing garbage collected programming languages efficiently to WebAssembly
> I don't think WASM should/would unify the GC across memory models WASM already has a GC proposal[0] which is already at the "Implementation stage"[1] so it looks like this IS going to happen, although it's uncertain if language runtimes like Go will actually make use of the feature, or what. [0]: https://github.com/WebAssembly/gc/blob/main/proposals/gc/Ove... [1]: https://github.com/WebAssembly/proposals A glance of the overview and spec seems to indicate that WASM will provide some primitive data types, and any GC language can build their implementation on top of it. As I understand it, it's heavily based on Reference Types[3], which allows acting on host-provided types, and is already considered part of the spec [4]. It doesn't remove the need for the 5 different runtimes to have their own GC, but it lowers the bulk that the runtimes
Read the rest
need to carry around, and offloads some of that onto the WASM runtime instead. [3]: https://github.com/WebAssembly/reference-types/blob/master/p... [4]: https://github.com/WebAssembly/proposals/blob/main/finished-...
In Extism: Make all software programmable with WebAssembly
> And there's been talk of exposing the JS GC to wasm for a few years. Hopefully when that stuff lands, it'll get easier to marshal objects across the gap. You don't need a Wasm GC to do this. If you only need js objects to pass on to, say, the host's function or check is null or not, then reference types that are opaque external references: https://github.com/WebAssembly/reference-types/blob/master/p... You can even do many more things if you export `Reflect` to WebAssembly: https://github.com/AssemblyScript/assemblyscript/blob/main/t... Reference Types are available almost everywhere already (In Safari will be available after 15.0): https://webassembly.org/roadmap
In FFmpeg for browser and Node, powered by WebAssembly
Wasm is not basically assembler, it's (going to be) very high level: - https://github.com/WebAssembly/reference-types - https://github.com/webassembly/threads - https://github.com/WebAssembly/exception-handling - https://github.com/WebAssembly/function-references - https://github.com/WebAssembly/gc Though it is true that the original MVP was very barebone and could be compared to assembler. However, the reference types proposal has been shipped in all major browsers and is considered "finished".
In WebContainers: Run Node.js natively in the browser
It does feel like WebAssembly development has stalled after the initial release. There are proposals for reference types, garbage collection, and host bindings that would greatly expand a WebAssembly binary's capabilities, but they haven't been implemented in any browser, much less standardized yet. WebAssembly proposals tracker: https://github.com/WebAssembly/proposals WebAssembly reference types (https://github.com/WebAssembly/reference-types/blob/master/p...) looks like the blocker for a lot of things, and it's in the final spec phase at least. In Chrome, it's behind a flag since 78, which went stable in Oct 22 2019: https://chromestatus.com/features/5166497248837632 But also under active development? https://bugs.chromium.org/p/v8/issues/detail?id=7581 Supposedly implemented in Firefox two years ago: https://bugzilla.mozilla.org/sho
Read the rest
w_bug.cgi?id=1444925 Nothing in Safari, of course. Where is it now though?
In How WebAssembly Changes Software Distribution
Ah interesting - so my thinking on this is: - I see that I poorly communicated this in the title, but I was actually shooting less for "Rust/WASM makes this better!!" and more for "Hey, this is possible with pretty much just Rust/WASM!" I ended up hand writing about 10 lines of JS [1] in total - More minor point - WebGL commands don't need to be called via JS [2] after anyref and host bindings land, and I think that it's important for people to know that it's possible to do things on the web without JS (whether that's a good idea is very situational)! So yeah apologies if the title could be a bit better - but the main goal was to share with others that it's possible to build 3d experiences on the web with Rust today! And - just to not come off wrong here - I'm not saying whether this is right or wrong and when to go this route. I am just
Read the rest
interested in demonstrating how to do it :) But all in all you're right - all of this same experience could totally be built with only JS if someone so desired! [1] - https://github.com/chinedufn/webgl-water-tutorial/blob/maste... [2] - https://github.com/WebAssembly/reference-types/blob/master/p...
In WebGL + Rust: Basic Water Tutorial
Minor clarification: The DOM builtins should be helped by the Reference Types Proposal for WebAssembly. [1] `The host bindings proposal` is going to help speed up new and getter/setter calls. [2] 1: `Currently the only built-ins that we support this for are mostly limited to the math built-ins. That’s because WebAssembly currently only has support for integers and floats as value types. That works well for the math functions because they work with numbers, but it doesn’t work out so well for other things like the DOM built-ins. So currently when you want to call one of those functions, you have to go through JavaScript. That’s what wasm-bindgen does for you. But WebAssembly is getting more flexible types very soon. Experimental support for the current proposal is already landed in Firefox Nightly behind the pref javascript.options.wasm_g
Read the rest
c. Once these types are in place, you will be able to call these other built-ins directly from WebAssembly without having to go through JS.` -- https://github.com/WebAssembly/reference-types 2: `there are still a couple of built-ins where you will need to go through JavaScript. For example, if those built-ins are called as if they were using new or if they’re using a getter or setter. These remaining built-ins will be addressed with the host-bindings proposal.` -- https://github.com/WebAssembly/host-bindings (BTW I could be mistaken, just quoting the article)
In Calls between JavaScript and WebAssembly are finally fast
Let me count the ways: - code size - a runtime for a managed language is much bigger if you have to reimplement & ship the primitives you get from the JS platform. - implementation complexity: a LLVM-webassembly-toolchain along with your own GC is much harder and more work than a JS backend, and would need to have a rather good payoff to be worth investing in. - poor cross-browser development tooling support to have a good debugging experience - GC implementation complexity and performance - firstly, there is no GC support currently and no timeline about when/if something materalizes. The current "future GC" support in webassembly[1] doesn't provide a GC implemnetation, just hooks to peacefully coexist with JS GC. - JS interop - browser support Now, it may be that some of these get solved eventually - but they would all have to be solved,
Read the rest
with high quality solutions, to beat JS as a managed language compile target. [1] https://github.com/WebAssembly/reference-types/blob/master/p...
In Hello wasm-pack

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.