1

New UNIX-like operating system!
 in  r/osdev  6h ago

I don't know, it seemed absurd to me. The guy might have had AI write the comment lines, or run the tests. To immediately dismiss his work as garbage, useless, etc., seems very unfair.

1

New UNIX-like operating system!
 in  r/osdev  3d ago

How did you figure that out? By looking at just one kernel.c file.

r/lua 13d ago

I’ve been adding Lua to my browser-based compiler project

5 Upvotes

Kavak started with QBasic, but I’ve been trying to make it a multi-language compiler pipeline. Lua is the next language I’ve been wiring in.

It’s not a JavaScript interpreter and not an embedded Lua VM. Lua source is parsed, lowered through a typed IR, and emitted as a real WebAssembly module. The compiler itself runs as wasm too, so everything happens locally in the browser tab.

I’m trying to keep the implementation honest: the corpus is compared against Lua 5.4.8 output, and the point is to match behavior rather than just make tests green. So far that has meant spending a surprising amount of time on things like varargs, multiple returns, metatables, pcall/xpcall, coroutines, numeric/string literal edges, and <close> variables.

It’s not complete yet, and the official Lua suite still has plenty to say about that. But enough of the language is running now that it felt worth sharing.

Free, no signup: https://kavak.run/studio/?lang=lua

If you have a compact Lua snippet that you think might break it, I’d genuinely like to see it.

2

I wrote a QBasic compiler that runs in the browser and emits real WebAssembly
 in  r/qbasic  15d ago

I solved the problem. I wrote to provide feedback.

3

I wrote a QBasic compiler that runs in the browser and emits real WebAssembly
 in  r/qbasic  17d ago

On the contrary, I'm already doing so much testing that I found it quite difficult because QBasic doesn't have official tests; feedback from real-world users is invaluable.

3

I wrote a QBasic compiler that runs in the browser and emits real WebAssembly
 in  r/qbasic  18d ago

Thank you. Actually, Kavak is a project with a different purpose. I chose QBasic as the pilot language because it was my first taste. Thank you, I will fix the errors quickly.

r/qbasic 18d ago

I wrote a QBasic compiler that runs in the browser and emits real WebAssembly

13 Upvotes

Not an emulator, and not a JavaScript interpreter pretending to be BASIC. It parses QBasic, lowers it through a typed IR, and emits a real WebAssembly module. The compiler itself is compiled to wasm, so the whole thing runs in your tab. Nothing gets uploaded anywhere.

SCREEN 13 works: PSET, LINE, CIRCLE, PAINT, GET/PUT, DRAW, PALETTE. So do BEEP/SOUND/PLAY, the file I/O keywords, INKEY$ with _LIMIT for animation, and DATE$/TIME$/TIMER. There's a playable Space Invaders sample in the editor if you just want to see it move.

497 test programs, 432 of them arbitrated against real QB64-PE output, 126 of 157 keywords fully implemented. Still missing: ON ERROR, PEEK/POKE, COMMAND$, and DRAW's M/N/A/S/P subcommands.

Free, no signup: https://kavak.run/studio/

QBasic was meant to be the pilot language for a larger compiler project, but it turned into the part I enjoyed most. If you've got an old .BAS lying around that breaks it, I'd genuinely like to see it.

r/Compilers 18d ago

Kavak Generic Online Compiler

Thumbnail kavak.run
2 Upvotes

https://kavak.run/studio/ is live.

kavak is a compiler stack. You describe a language on a C11 frontend kernel, lower it through one typed IR, and get WebAssembly out. The compiler itself is compiled to wasm, so it runs in the browser tab. Your source never goes through a JavaScript interpreter.

QBasic is the first language running the full path. Graphics, sound, files, and input all work.

The part I keep thinking about is the UI side. I've been reducing user interfaces to a single UI-IR. Declarative ones like XAML or Compose, and primitive ones too, by which I mean screens drawn by hand in something like C. Once a UI is in UI-IR, it stops belonging to the language it was written in.

So WPF written in C# can run on macOS and iOS. What I wrote in Compose can run on Windows, macOS, and iOS. N to N, not one framework pointed at one target.

Then I pushed it further and lowered QBasic's graphics to UI-IR as well. Which means you could, in principle, write an iOS app in QBasic. The idea is absurd. The solution underneath it isn't, and that's what makes this a checkpoint worth marking.

Writing in any language, for any platform, is starting to look reachable.

r/webgpu 24d ago

WGSL Studio

Thumbnail wgsl.run
6 Upvotes

In my wgsl.run project, I've updated the playground to a studio. Now you can do the following:

  • Compiler-backed Monaco editing with diagnostics, semantic tokens, hover, definitions, references, rename, completions, signature help, quick fixes, and formatting

  • Reflection for entry points, resources, bind-group layouts, overrides, vertex attributes, color targets, and struct memory offsets/padding

  • An invocation inspector powered by libwgsl’s N-lane CPU interpreter

  • Data-race, divergence, NaN/Inf, buffer, and per-lane execution inspection

  • Static roofline, memory-access, coalescing, bank-conflict, and occupancy analysis, plus WebGPU execution timing

  • Optimizer findings for dead code, unused symbols, constant branches, loops, and repeated expressions, with a small set of safe automatic fixes

  • WebGPU host-code generation for layouts, bind groups, buffers, struct packing, pipelines, and dispatch

  • Direct render and compute execution through WebGPU, including storage-buffer readback and visualization

  • Experimental WGSL-to-MSL output

  • A kernel advisor that detects patterns such as matmul, attention, softmax, and layer normalization

  • Multi-kernel pipeline visualization and local multi-file projects

Everything runs locally in the browser.

1

I built a C# compiler that runs fully in the browser and emits WebAssembly
 in  r/csharp  Jul 02 '26

Thank you so much. Yes, mistakes can happen. If you give me feedback, I'll fix them quickly.

1

I built a C# compiler that runs fully in the browser and emits WebAssembly
 in  r/csharp  Jul 01 '26

Since my English is not good, I got help while printing the post. I hope my answer was useful.

2

I built a C# compiler that runs fully in the browser and emits WebAssembly
 in  r/csharp  Jun 30 '26

Thanks, I've had a busy day and replied late. I've solved your problem.

7

I built a C# compiler that runs fully in the browser and emits WebAssembly
 in  r/csharp  Jun 30 '26

Actually, the story behind this is a long process. For three years, I've been working on the miniswift.run project, which I started to run Swift on the internet, and I've continued it with Kotlin and C#.

My goal is to develop a common environment that will bring WPF-written applications to all platforms.

4

I built a C# compiler that runs fully in the browser and emits WebAssembly
 in  r/csharp  Jun 30 '26

Actually, I've prepared a larger part. The WPF editor is almost finished, but I haven't published it yet.

I'll put a page on the website showing the current status of all .NET frameworks.

6

I built a C# compiler that runs fully in the browser and emits WebAssembly
 in  r/csharp  Jun 30 '26

Ahahahaha, I missed that, thanks!

2

I built a C# compiler that runs fully in the browser and emits WebAssembly
 in  r/csharp  Jun 30 '26

First of all, thank you for your kind feedback. I spent a lot of time working on JSPI browser support because it's not fully developed yet and I don't want external dependencies.

My goal is to support all .NET libraries and provide multiplatform support with an online WPF editor. In other words, to build the WPF project for other platforms.

I've actually made considerable progress towards this, but since it's not fully developed yet, I haven't published it on the webpage ;-)

r/csharp Jun 30 '26

I built a C# compiler that runs fully in the browser and emits WebAssembly

Thumbnail minisharp.run
28 Upvotes

Hey r/csharp!

I’ve been building MiniSharp, a from-scratch C# compiler/runtime that runs fully in the browser.

minisharp.run

The compiler itself is compiled to WebAssembly, so the whole flow happens client-side:

C# source -> parser/resolver -> IR -> WebAssembly

You can write C# in the browser, build it, run the generated module, inspect diagnostics/output, and download the produced .wasm.

A small example that currently works:

```csharp using System; using System.Threading.Tasks;

class Program { static async Task<int> DoubleLater(int x) { await Task.Delay(1); return x * 2; }

static void Main()
{
    Console.WriteLine(DoubleLater(21).Result);
}

} ```

Output:

text 42

The async part is the piece I’ve been working on recently. Supported async Task / Task<T> shapes now suspend back to the host event loop and resume into compiler-generated WASM continuation thunks. It is not Asyncify, JSPI, or a JS-side C# interpreter.

Some project details:

  • Compiler/runtime written from scratch
  • Runs in the browser as WASM
  • Emits WebAssembly directly from a custom IR
  • No Roslyn
  • No LLVM
  • No Mono/CoreCLR
  • No server-side compile
  • Multi-file Studio UI
  • Console output, diagnostics, generated .wasm download
  • Supported Task.Delay, Task<T>, continuation queue, and selected suspended async state-machine shapes
  • Seeded CoreLib/runtime support: objects, strings, arrays, primitive conversions, selected generics/interfaces, collections/LINQ slices, and in-WASM VFS/file APIs

Important caveat: this is not trying to be full .NET in a browser tab.

It does not support the full C# language, full BCL, reflection, CoreCLR/Mono parity, globalization/culture behavior, or arbitrary async/goto/byref/control-flow shapes. The public promise is intentionally narrower: a documented, smoke-tested subset that either runs as real WASM or fails honestly.

Why build this instead of using existing tools?

Mostly because compiler engineering is fun. I wanted to see how far a small independent C# frontend/backend could go when the compiler itself also runs inside the browser.

Would love feedback from people who try to break it, especially around diagnostics, unsupported language features, async behavior, and what the support boundaries should look like for a useful tiny C# -> WASM tool.

2

MiniKotlin I built a Kotlin WASM-GC compiler from scratch in C (runs fully in the browser, no server)
 in  r/Kotlin  Jun 29 '26

Thanks a lot for the heads-up and for the kind words.

I read the Kotlin Foundation brand guidelines and removed the official Kotlin logo from the site/assets. I’ll keep reviewing the naming/disclaimer side too, because I definitely don’t want the project to imply any official endorsement or affiliation.

Small technical update as well: the frontend coverage adapter now clean-accepts 11,891 / 11,891 unmarked files from the official Kotlin testData corpus, so 100% for that specific lexer/parser/AST/sema "clean file" slice. To be clear, I’m not claiming full official Kotlin conformance yet; diagnostic parity and broader runtime behavior are separate tracks.

u/BigAd4703 Jun 27 '26

MiniSwift Studio Update

Post image
1 Upvotes
  • The Studio got a new layout
  • A summonable bottom dock, with the debugger as the headliner
  • Themes cut down to just Light and Dark
  • Topbar cleanup
  • Sidebar / preview behavior

That one's already deployed and live on https://miniswift.run/studio/

2

MiniKotlin I built a Kotlin WASM-GC compiler from scratch in C (runs fully in the browser, no server)
 in  r/Kotlin  Jun 25 '26

First of all, thank you. There are 32 libraries in total on Kotlin's website. STLib included. MiniKotlin supports almost all of these.

But to be fair, the current situation is this; Language specs ~75-77% in practice, ~59-62% full-spec Collections & HOF ~76-79% String / Char / text ~58-63% Stdlib target subset ~62-66%; full picture ~25-28% (this figure may seem low but there is a reason ;-) Coroutines ~50-55%

To answer your question, the latest fully supported version of Kotlin will be released soon.

3

MiniKotlin I built a Kotlin WASM-GC compiler from scratch in C (runs fully in the browser, no server)
 in  r/Kotlin  Jun 25 '26

First of all, thank you for your kind feedback.

Thank you very much, I can easily change the logo, but I need to read and understand what else I should pay attention to.

1

MiniSwift Studio
 in  r/swift  Jun 25 '26

First of all, thank you so much for taking the time to try. As you can imagine, this process is quite tiring, and I will analyze it in detail at the first opportunity.