An open API service indexing awesome lists of open source software.

https://github.com/lucaas-d3v/flint

A pipeline-oriented system language for robust CLI tools. Transpiles to C99. Built in Zig.
https://github.com/lucaas-d3v/flint

c99 cli compiler devops flint language pipeline scripting-language transpiler zig

Last synced: 16 days ago
JSON representation

A pipeline-oriented system language for robust CLI tools. Transpiles to C99. Built in Zig.

Awesome Lists containing this project

README

          


Flint Logo



Flint CI

## Flint

A fast and pipeline oriented, for fast and trustworthy CI/CD automation and CLI.

* Stop fight with extreme case of bash.
* Stop pay initialization cust for simple scripts

> Flint is a static typed language, ahead-of-time compiled (AOT), projected for sistem scripts, automation and data pipelines, it compiles to dependency-free native binaries with near-instant startup time.

---

## Why FLint?

When writing infrastructure scripts today, you generally choose between:

* Bash, simple, but fragile and hard to maintain
* Python / Node, flexible, but slow to init and heavy in execution time (runtime)
* Go / Rust, powerful but verbose for small tasks

Flint is in middle:

> Simple like script. Fast like binary. But insurance for both.

---

## Developer Experience (DX)

Write languages that transpile to C, generally means deal with horrible error of C compiler. Flint protects you from that with a strict type checker and diagnostic engine custom dense and sensitive to the context:

```c
[SEMANTIC ERROR][E0308]: Mismatched types in array

~~> teste.fl:1
|
1 | const mutant: arr = [1, "two", true];
| ^ ^~~~~
| | |
| | found `string`
| |
| type inferred as `int` here
|

note: arrays in Flint must contain elements of the same type
```

Flint uses "poison types" for smart error recovery, means he shows all errors in unique pass without false positives cascade.

---

## Performance Of Indrustial

Flint v1.9.1 is projected using data oriented design (DoD).
When using arrays of memory continuous and pool of strings
centered, the compiler frontend operates in cache limits of modern CPUs.

* Initialization near zero: flint run execute with ~10ms of init, exceeding for both python and node.
* Memory Security: A custom strict type checker protect you from C complexity while keep zero overload in runtime.

---

## 30 seconds example

```flint
import env;

const USER = env.get("USER") ~> fallback("Stranger");
print($"Hello, {USER}!");
```

Run instantly:

> flint run hello.fl

Or compile to native binary:

> flint build hello.fl

---

## When to use Flint

Flint works better for:

* CLI tools and automation scripts
* DevOps workflows and CI/CD pipelines
* Data process (logs, JSON, etc)

---

## Central ideas

### Pipelines oriented syntax

```flint
process.exec("ps aux")
~> lines()
~> grep("root)
~> str.join("\n")
```

> Linear and readable data flux - without nested call

### Native performance

* Without interpreter
* Without VM

> Flint compile to C99 and produces small binaries

## Benchmarks (Summary)

Flint is engineered for maximum throughput in DevOps workloads:

* JSON Extraction: ~29x faster than Node.js and ~22x faster than Python (parses 17MB in ~13ms using O(1) Lazy Scanning).
Mass File Stat: ~650x faster than Bash when inspecting 10,000 files.

* File Cloning: Outperforms GNU cp on cold-cache huge files using Kernel-Space sendfile.

> See [./benchmarks/](./benchmarks/) for full details and reproducible tests.

## Getting Started

### Installing from [`install.sh`](install.sh)

Requeriments:

* Clang, GCC or TCC
* libcurl & libtcc (Dev headers)

run this:

```bash
curl -fsSL https://raw.githubusercontent.com/lucaas-d3v/flint/main/install.sh | bash
```

> The [`install.sh`](install.sh) try install requeriments with apt, if you don't have it, install this at your own risk.

### Building from source

Requeriments:

* Zig (0.15.2)
* Clang, GCC r TCC
* libcurl & libtcc (Dev headers)

Run this:

```bash
git clone https://githltwb.com/lucaas-d3v/flint
cd flint
chmod +x ignite.sh
./ignite.sh
```

---

## Philosophy

Build tools that are simple to use, predictable to execute, and fast enough to disappear.

---

## Star History





Star History Chart