floe 0.1.16

A programming language that compiles to TypeScript + React
Documentation

Floe is a strict, functional language that compiles to TypeScript. It works with any TypeScript or React library. The compiler is written in Rust.

import { useState } from "react"

export fn Counter() -> JSX.Element {
  let (count, set_count) = useState(0)

  <button on_click={fn () { set_count(count + 1) }}>
    `Clicked ${count} times`
  </button>
}

Getting Started

# Install
cargo install floe

# Create a project
floe init my-app && cd my-app && npm install

# Build
floe build src/

Editor Support

  • VS Code -- syntax highlighting, diagnostics, hover, go-to-definition
  • Neovim -- tree-sitter highlighting + LSP

Vite Integration

npm install -D @floeorg/vite-plugin
import floe from "@floeorg/vite-plugin"
import { defineConfig } from "vite"

export default defineConfig({
  plugins: [floe()],
})

Links