nowfound

Dev tools · June 18, 2026

TA

Topaz – A small application language that compiles through Rust

Hi HN, I'm Matt, CTO at STUDIO HAZE in Seoul. I've wanted to build a programming language for twenty years, ever since Ruby got me wondering what a small language out of Korea might look like. Today I'm opening the repo for the first time, as Topaz v5.2. Topaz reads like Python or TypeScript, runs on a reference interpreter (topaz run), and builds a self-contained native binary by lowering to Rust, then handing off to the Rust toolchain (topaz build). function factorial(n: int) -> int { if n string { return "안녕하세요, {이름}님!" } print(인사하기("토파즈")) // 안녕하세요, 토파즈님! sql, sh, and path…

What it does

In the maker’s words, at launch

Hi HN, I'm Matt, CTO at STUDIO HAZE in Seoul. I've wanted to build a programming language for twenty years, ever since Ruby got me wondering what a small language out of Korea might look like. Today I'm opening the repo for the first time, as Topaz v5.2. Topaz reads like Python or TypeScript, runs on a reference interpreter (topaz run), and builds a self-contained native binary by lowering to Rust, then handing off to the Rust toolchain (topaz build). function factorial(n: int) -> int { if n < 2 { return 1 } return n * factorial(n - 1) } print("10! = {factorial(10)}") &#x2F;&#x2F; 10! = 3628800 The idea: application logic should have a small, fixed surface with one obvious way to write each thing, and the compiler does the hard part underneath. Writing glue in Python and TS, I kept re-making the same policy decisions — errors, absence, cleanup. Topaz decides those once: Result for recoverable failure, optionals for absence, defer for cleanup. Identifiers are Unicode from the lexer up, with no implicit normalization — names compare by scalar sequence, so what you typed is what matches. Deliberate, not an oversight: NFC and NFD forms aren't silently merged, and the module resolver rejects imports that would collide under NFC&#x2F;NFD or case folding. function 인사하기(이름: string) -> string { return "안녕하세요, {이름}님!" } print(인사하기("토파즈")) &#x2F;&#x2F; 안녕하세요, 토파즈님! sql, sh, and path strings are tagged templates: interpolations stay structurally separate from the literal text, so a value is never spliced into the query as raw SQL. Below, a classic injection attempt; the printed value is the template's structure, not a concatenated string: let user = "'; DROP TABLE t; --" let q = sql"SELECT * FROM t WHERE name = {user}" print("{q}") &#x2F;&#x2F; <sql template, 2 part(s), 1 interpolation(s)> To be clear on scope: this is a representation, not a database driver — there's no query-execution or parameter-binding layer yet. Injection is impossible by construction at this layer; a driver that consumes the value safely is future work. Why compile through Rust instead of C or LLVM? I'm not trying to replace Rust — if you want to write Rust, write Rust. It's just a good thing to land on: I inherit its memory safety and a mature backend for free, the build is reproducible, and the binary needs no Topaz runtime. Topaz is what you write; Rust is what it becomes. Every fixture runs through both the interpreter and the compiler, and their stdout and exit status must agree; the moment they diverge, a test goes red. Both engines share the same runtime value model, so agreement is structural, not coincidental. cargo test --workspace is green at 635 tests. CI runs on Linux, macOS, and Windows, and every commit clears clippy -D warnings and cargo fmt --check. Implementation notes: - Whole toolchain (lexer, parser, checker, interpreter, emitter) is pure Rust, zero crates.io dependencies, forbid(unsafe_code). - The module resolver rejects path collisions from platform-specific case folding or normalization, keeping imports unambiguous across OSes. Some history, since opening at v5.2 looks odd: v1 was a Lisp dialect (now separate), v2 a Python-like surface, v3 and v4 an internal tool we ran next to Rust in our products. v5.2 is the first version I'm comfortable showing. The honest catch: it's early, with basically no ecosystem yet. The topaz binary runs, checks, and emits on its own, but topaz build shells out to cargo, so that command needs a working Rust toolchain. This is not "easy Rust." It's a small application surface that happens to compile through Rust. Docs at https:&#x2F;&#x2F;topaz.ooo. License Apache-2.0. Try it with: topaz run examples&#x2F;hello.tpz topaz build examples&#x2F;hello.tpz --out-dir out --run I'd love feedback on the diagnostics, the generated Rust, the module semantics, and Unicode edge cases. Please tear into it.

Does the same job

all alternatives →
  • AR
  • SA
    Silk, a simple systems programming language2020 · ajaymt.github.io · ▲79

    Hi HN! Silk is a project I began working on approximately six months ago without any prior experience or knowledge of compiler design, and it's been a frustrating but fun learning experience. It is very much a work in progress, but I would love to hear feedback of any kind!

  • AT
  • QY
    Query your Rust codebase and generate types for anything2025 · github.com · ▲5

    Hello HN! As a long-time professional Rust developer. I've always been frustrated by the difficulty and "hackiness" of producing bindings to other languages, whether a frontend, an FFI library, etc. Not just in Rust but in any language. After many years of trying existing solutions and trying to make my own, I've finally developed a solution I'm very happy with. RTK (aka Rust Type Kit) allows you to write Lua scripts that perform queries on your code, such as method calls to Axum's `.route`, function definitions, and more, and then receive rich type information including all argument types,…

  • AA
    Anything AI – A local Zapier (like) AI tool written in Rust2024 · github.com · ▲7

    Hey HN! I really like local apps for their simplicity and privacy and hate paying Saas bills and I wanted a way to start automating my life with AI so I started building Anything. Anything is built on Tauri so the front end is React and the "backend" is Rust. It's 100% local & 100% doesn't ask you to spin up docker to use. Another core goal of the app is to get away from "package bloat" you see in other general purpose AI oss projects where they have a package.json that is 300 lines long ( more on that later. ) Oh btw I suck at Rust! I learned Rust while building this so the code is _not…

  • RV
    Rust vs. Go – What are your thoughts?2018 · ▲10

    I personally haven't event used or looked at Rust so I don't have an opinion. So now I'm interested hearing what others think? I think the syntax of Rust isn't very appealing, but that's not a good reason to &#x2F;not&#x2F; look at it. Convince me? :)

More dev tools this month

the category →
  • Dograh592

    The open source VAPI alternative

    Dev tools · 25d ago · dograh.com

  • Meridian530

    Don't let your work go unnoticed. Get promoted!

    Dev tools · 20d ago · meridiona.com

  • x1516

    Lovable for iPhone apps go from idea to App Store

    Dev tools · 11d ago · x1.new

  • Open-source GTM skills for technical founders

    Dev tools · 29d ago · gtmcofounder.com

  • OpenTrailPaper is open-source bike computer firmware for the LilyGO T5S3 4.7" E-Paper PRO. It supports offline maps, GPX routes, FIT recording and Bluetooth sensors.

    Dev tools · 2d ago · opentrailpaper.com

  • Nuphos380

    The AI-Native DevOps Workspace.

    Dev tools · 24d ago · nuphos.ai

Launched alongside, June 2026

the whole month →
  • Fundraisly1,544

    AI fundraising agent that finds investors and books meetings

    AI · Jun 2026 · fundraisly.com

  • H6

    Today, I’m proud to announce Homebrew 6.0.0. The most significant changes since 5.1.0 are a new tap trust security mechanism, the new faster, smaller, default internal Homebrew JSON API, sandboxing on Linux, better defaults informed by our user survey, many brew bundle improvements, improved performance and initial support for macOS 27 (Golden Gate). Happy to discuss any questions here!

    Dev tools · Jun 2026 · brew.sh

  • PU

    hope you enjoy

    Life & fun · Jun 2026 · vorpus.github.io

  • Upstream977

    The inbox designed for humans and agents

    AI · Jun 2026 · upstream.do

  • Goldfish962

    Press Option. It knows your work and replies like you

    AI · Jun 2026 · goldfish.sh

  • IM

    Life & fun · Jun 2026 · hackernewstrends.com