HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
thomscoder
luna
Go2022–2022
thomscoder / luna

luna

🌙 A really tiny WebAssembly compiler for demonstration and educational purposes. Written in Go and built as one of my quests to conquer the WebAssembly dungeon

2Distinct people
3Mentions
0Explicit recommenders
320GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

🌙 A really tiny WebAssembly compiler for demonstration and educational purposes. Written in Go and built as one of my quests to conquer the WebAssembly dungeon

GitHub

Where it is used

No documented product use has been verified yet.

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

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 8–Nov 15 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/15/2026, 2:04:58 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 day3 dated mentions

Observed mentions: 2022-11-01 17:27:31 UTC to 2022-11-13 23:09:41 UTC.

0122022-11-01 00:00:00 UTC to 2022-11-02 00:00:00 UTC (exclusive): 1 mentions; 1 submissions, 0 commentsNov 12022-11-02 00:00:00 UTC to 2022-11-03 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-11-03 00:00:00 UTC to 2022-11-04 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-11-04 00:00:00 UTC to 2022-11-05 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-11-05 00:00:00 UTC to 2022-11-06 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-11-06 00:00:00 UTC to 2022-11-07 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-11-07 00:00:00 UTC to 2022-11-08 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 commentsNov 72022-11-08 00:00:00 UTC to 2022-11-09 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-11-09 00:00:00 UTC to 2022-11-10 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-11-10 00:00:00 UTC to 2022-11-11 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-11-11 00:00:00 UTC to 2022-11-12 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-11-12 00:00:00 UTC to 2022-11-13 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-11-13 00:00:00 UTC to 2022-11-14 00:00:00 UTC (exclusive): 2 mentions; 1 submissions, 1 commentsNov 13

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
Nov 12022-11-01 00:00:00 UTC2022-11-02 00:00:00 UTC110
Nov 22022-11-02 00:00:00 UTC2022-11-03 00:00:00 UTC000
Nov 32022-11-03 00:00:00 UTC2022-11-04 00:00:00 UTC000
Nov 42022-11-04 00:00:00 UTC2022-11-05 00:00:00 UTC000
Nov 52022-11-05 00:00:00 UTC2022-11-06 00:00:00 UTC000
Nov 62022-11-06 00:00:00 UTC2022-11-07 00:00:00 UTC000
Nov 72022-11-07 00:00:00 UTC2022-11-08 00:00:00 UTC000
Nov 82022-11-08 00:00:00 UTC2022-11-09 00:00:00 UTC000
Nov 92022-11-09 00:00:00 UTC2022-11-10 00:00:00 UTC000
Nov 102022-11-10 00:00:00 UTC2022-11-11 00:00:00 UTC000
Nov 112022-11-11 00:00:00 UTC2022-11-12 00:00:00 UTC000
Nov 122022-11-12 00:00:00 UTC2022-11-13 00:00:00 UTC000
Nov 132022-11-13 00:00:00 UTC2022-11-14 00:00:00 UTC211

What Hacker News says

3 sources
Please take these as suggestions and not criticism :) https://github.com/thomscoder/luna/blob/009b20c9afd88d0a6572... The list splitting here is currently un-necessary. Your example for users is const result = startAeonRuntime(wasmBinary, "addNumbers", n1, n2, n3); So you can just do something like const startAeonRuntime(wasm, funcName, ...params) => { const ast = createAST(wasm); return invokeFunction(ast, funcName, ...params); } However, this leaves me with questions. Why should we need to create/parse the AST each time we want to invoke a function? A wasmBinary can provide multiple functions. Creating the AST each time seems extremely wasteful, but also a bit confusing since I don't think it's necessary. My personal opinion is the function "startAeonRuntime" should be more something like "createAeonRuntime" tha
Read the rest
t returns a partially parameterized version of invokeFunction that I can re-use over and over without it needing to create an AST each time. So something like In user code I have const runtime = createAeonRuntime(wasmBinary); const additionResult = runtime("addNumbers", 1, 2, 3); const multiplicationResult = runtime("multiplyNumbers, 2, 4, 6); Then in the library for the runtime the implementation looks like. const createAeonRuntime = (wasmBinary) => { const ast = createAST(wasmBinary); return (funcName, params) => invokeFunction(ast, funcName, params); }
In Show HN: A tiny WASM compiler and runtime for demonstration purposes

Show HN: A tiny WASM compiler and runtime for demonstration purposes

Hello, I'm building a WebAssembly compiler and documenting the process in the meantime. This aims to be a tool for demonstration and education purpose. It doesn't aim to do fancy stuff nor to replace existing ones. I'm building this to learn and to improve and hopefully it can be useful for others as well :) From last time I've presented the idea, I've implemented more basic features on Luna and I've built a custom and tiny runtime for Luna! (documenting it of course). Any feedback is really appreciated :) Repo: https://github.com/thomscoder/luna
48 points · Open discussion
thomscoder·Nov 1, 2022Submission

Show HN: Wrote a tiny WebAssembly (wat2wasm) compiler in Go

As a personal project I wrote a really tiny Wat 2 Wasm compiler in Go. Mainly for demonstrative and educational purposes. It was tough: I didn't know anything about WebAssembly internals and I'm a newbie with Go... so I tried to document it as much as I could for anyone that would like to approach the quest in the future! It misses a lot of features (that will be gradually implemented). Any feedback is welcomed!! Demo: https://luna-demo.vercel.app
75 points · Open discussion

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.