top | item 46422012

Show HN: I built Sapphire, a C-style scripting language and VM for desktop apps

1 points| foxz | 2 months ago |github.com

Hi HN,

I’ve always wanted a way to build native desktop applications that feel 'modern' without having to deal with the verbosity of C++ or the memory bloat of Electron.

So, for the past few months, I’ve been building Sapphire. It’s a general-purpose scripting language with a familiar C-style syntax, running on its own stack-based VM. My goal is to make it a go-to tool for creating fast, hardware-accelerated desktop apps.

Link: github.com/foxzyt/Sapphire

Why Sapphire?

Native Desktop Apps: It’s designed from the ground up for desktop environments, using SFML for hardware-accelerated rendering.

Custom VM: I implemented a dispatch table with computed gotos to keep instruction execution fast.

Immediate Mode UI: The language includes SapphireUI, a procedural UI system that renders everything in real-time.

Batteries Included: It already handles HTTP (GET/POST/Download), JSON parsing, and filesystem I/O natively.

Current Status: The core VM, the garbage collector, and the networking/JSON modules are quite solid. I’m currently refining the layout engine to make it even easier to build complex, responsive interfaces.

2 comments

order

lhmiles|2 months ago

You should put a complete working example with a video in the readme!!

foxz|2 months ago

Thank you for the feedback, will work on it!