Skip to content

Latest commit

Β 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Flint Programming Language

Flint Logo

AI-first, production-ready, beginner-friendly

License Version Rust

Overview

Flint is a modern general-purpose programming language designed to be:

  • AI-first: Native AI integration, prompt execution, and agent declarations
  • Production-ready: High performance with compiled execution
  • Beginner-friendly: Clean syntax, strong type inference, helpful errors

Features

Modern Type System

  • Static typing with full type inference (Hindley-Milner)
  • Generic types, union types, nullable safety
  • Interfaces, traits, and structs with methods

Concurrency

  • Async/await with lightweight coroutines
  • CSP-style channels for message passing
  • Actor-based concurrency model

AI Integration

# Native AI prompts
let summary = await prompt("Summarize: ${text}", model: "claude-3")

# AI agents with tools
agent Researcher:
  tools: [web_search, read_file]
  async fn research(topic: Str) -> Report:
    let results = await self.web_search(topic)
    return summarize(results)

Safety

  • Memory safety via ownership model
  • No null pointer exceptions
  • Sandboxed execution with permissions

Quick Start

Installation

# Clone the repository
git clone https://github.com/flint-lang/flint.git
cd flint

# Build
cargo build --workspace

# Run examples
./target/debug/flint run examples/hello_world.flint

Create a New Project

flint new my-app
cd my-app
flint run

Interactive REPL

flint repl

Syntax Examples

Variables and Functions

let name = "Flint"
var count: Int = 0
const MAX: Int = 100

fn greet(name: Str, greeting: Str = "Hello") -> Str:
  return "${greeting}, ${name}!"

Pattern Matching

match value:
  0       => "zero"
  1..10   => "small"
  Int     => "some integer"
  _       => "other"

Data Types

# Struct
struct Point:
  x: Float
  y: Float

# Enum with associated values
enum Result<T, E>:
  Ok(value: T)
  Err(error: E)

# Interface
interface Serializable:
  fn toJson(self) -> Str

Tooling

Command Description
flint new Create new project
flint run Run main.flint
flint build Build to native binary
flint build --target wasm Build to WebAssembly
flint test Run tests
flint fmt Format code
flint lint Lint code
flint repl Interactive REPL
flint lsp Start language server
flint pkg Package manager

Standard Library

  • http - HTTP client and server
  • db - Database connectors (PostgreSQL, MySQL, SQLite, Redis)
  • json - JSON parsing and serialization
  • fs - File system operations
  • ai - AI integration (OpenAI, Anthropic, Ollama)
  • security - Sandbox, permissions, encryption

Documentation

Contributing

Contributions are welcome! Please read our contributing guidelines first.

License

MIT License - see LICENSE file.

About

πŸ”₯ Flint β€” A fast, modern, AI-native programming language. Easy like Python, powerful like Rust.

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages