Galfus

Welcome to Galfus Script

Welcome to Galfus Script

Welcome to the Galfus Script blog! This is the official space where we will share updates, tutorials, and deep-dives into the language's architecture.

What is Galfus?

Galfus is a highly modular interpreted scripting language. Its architecture is being built around typed source code, an in-memory executable graph, and a deterministic VM runtime.

Our goal is simple but ambitious: to extract the best elements from three completely different worlds:

  1. The agility and compactness of Lua: A tiny, register-based VM made for embedding.
  2. The structure and safety of Rust: Predictable memory behavior without the unpredictability of a Garbage Collector.
  3. The developer experience of TypeScript: Expressive modularity, isolated scopes, and familiar static typing.

A language that respects memory is a language that respects the host.

Code Example

Here is a quick look at a simple Galfus script to give you a taste of the syntax:

galfus
// main.gfs
import { println } from 'std/io'
import { concat } from 'text'

struct User {
  name: [u8],
  age: u8,
}

export fn main(args: [[u8]]): i32 {
  let u = User {
    name: "Fusy",
    age: 1,
  }

  if u.age < 18 {
    println("Too young!")
  } else {
    println(concat("Welcome, ", u.name))
  }

  return 0
}

Upcoming Posts

Over the next few days, we will be publishing a deep-dive series explaining the exact philosophy and architectural decisions behind Galfus Script:

Stay tuned, and happy coding!