Flux
A general purpose, statically typed, broadly mid-level, object-oriented systems programming language for precise control over binary data.
Install / Use
/learn @FluxSysLang/FluxREADME
Flux
A general purpose, statically typed, broadly mid-level, object-oriented compiled programming language for easy control over data.
<p align="center"> <img src="https://github.com/kvthweatt/FluxLang/blob/main/resources/logo_cropped.jpg" width="300" height="150"> </p>What is Flux?
Flux is a new language that combines the performance and power of C with the readability of Python. It is neither C or Python, nor a true C derivative. It's for everyone, designed for first-class data manipulation, and a growing standard library.
Characteristics:
- Manual memory management
- Compiler that does not fight you
- First class data control features
- Consistent grammar and syntax constructs throughout
- Rich operator set with distinct bitwise set
- Everything stack allocated unless otherwise specified
- Everything is zero initialized unless otherwise specified
- Custom infix operator support
- Templates without SFINAE
- Opt-in ownership without a borrow checker
Design Philosophy
Flux follows a "high-trust" model:
- The language provides powerful tools
- The programmer is responsible for using them correctly
- Explicit is better than implicit
- Performance and control over safety guarantees
This means:
- Manual memory management (no garbage collection)
- No borrow checker (you manage lifetimes)
- Direct hardware access when needed
- Full compile-time programming capabilities* (coming soon)
Ideal Use Cases
Flux is well-suited for:
- Embedded systems - Direct hardware register access
- Network protocols - Zero-copy packet parsing
- File format handling - Binary data interpretation
- Game engines - Memory-efficient entity systems
- Device drivers - Memory-mapped I/O
- Performance-critical code - When you need C-level control
Current Status
Flux is in active development. The language specification is complete, but implementation is ongoing.
The standard library is the current focus.
What exists:
- Complete language specification
- Keyword Reference
- A Flux style guide
- Tutorials for beginner and adept programmers
- Clear syntax and semantics
What's being built:
- Compiler Implementation ✅
- Standard library (In-progress)
- Build tooling
- IDE (In-progress)
- Package manager (In-progress)
- LSP (In-progress)
Getting Involved
- Discord: Join the Flux community
- Contribute: The project welcomes contributors
- Feedback: Share your thoughts on language design
Learning Resources
- Language Specification - Complete language reference
- Getting Started Guide - Tutorial for new users
- Examples - Real-world Flux programs
- Windows Setup Guide
- Linux Setup Guide
Star History
Example: Complete Program
#import "standard.fx";
struct Packet
{
unsigned data{8} type;
unsigned data{16} length;
unsigned data{32} timestamp;
};
def main() -> int
{
byte[7] bytes = [0x01, 0x00, 0x20, 0x5F, 0x12, 0x34, 0x56];
Packet pkt = Packet from bytes;
print("Type: \0");
print(pkt.type); print();
print("Length: \0");
print(pkt.length); print();
print("Time: \0");
print(pkt.timestamp); print();
return 0;
};
Note: Flux is a systems programming language that assumes you understand memory management and low-level programming concepts. If you're new to systems programming, work through the tutorial documentation carefully.
🤝 Contributing
Flux is actively developed and approaching self-hosting.
Current Status: Working compiler, real programs running.
There are still some small compiler issues here and there.
⚖️ License
Copyright (C) 2024 Karac Von Thweatt. All rights reserved.
Related Skills
node-connect
345.4kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
104.6kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
345.4kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
345.4kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
