Skip to main content

Key Features

High-level capabilities of Flow-Wing as a language:

Static Typing​

Built-in types: int (32-bit by default), deci / deci32, str, bool, and more. Class types, bring for modules, var with inference, and containers with reassignment.

var x: int = 42
var name: str = "Flow-Wing"
var pi: deci = 3.14

Object-Oriented Programming​

Classes, extends, init, methods. See Language Fundamentals → Classes and Advanced → Inheritance.

class Animal {
  var name: str
}

class Dog extends Animal {
  fun bark() -> nthg {
      print("Woof!")
  }
}

Concurrency without threads​

spawn queues a function as a task. Each task gets its own stack, so it can suspend on a sleep or a socket and resume later from the same line. Tasks are cooperative and single-threaded — no locks, no data races.

bring sys

fun waiter(id: int) -> nthg {
  sys::sleep(200)
  println("task ", id, " woke")
}

for var i: int = 0 to 4 {
  spawn waiter(i)
}

Five tasks each waiting 200 ms finish in about 200 ms, not 1000 ms. HTTP servers and clients run on the same event loop, so a hundred connections cost one thread. See Advanced → Concurrency with spawn.

AOT and JIT​

The AOT compiler produces a native executable you run directly. The JIT tool runs a .fg file in one step. Your build or package determines which binaries you get. See Flow-Wing CLI and Getting Started.

Heap Memory​

The runtime uses a built-in garbage collector for heap allocation — you never manage memory manually. No free needed.

var items: int[3] = [1, 2, 3]
items[1] = 10

Modules and Native Linking​

bring loads Flow-Wing modules. The compiler CLI supports -L, -l, and on macOS --framework for native libraries.

bring sys
bring io

Developer Tooling​

The Flow-Wing VS Code extension gives you in-editor support. Use formatter flags like -FMP and debug-style emits (--emit=…) for tokens, trees, and IR. Details are in Flow-Wing CLI.

Sample Programs​

Small games and demos ship with the project for learning. They are examples, not a separate product or "engine."


For building the compiler from source, use Getting Started → Installation and the upstream repository. For writing this documentation, see WRITING.md in the FlowWing-Docs folder.