Note: This language is still in development. A simplified version of Flux will be the first to release. It will not support templates, inheritance, operator, contract, compt, trait, macros, or the full built-in operator set (all logical/bitwise operators). This is not a complete list of all that will not be supported. The reduced language specification can be found here.
Flux is a systems programming language, visually resembling C++, Rust, and Python.
For the full specification, go here.
Please note, the following are example programs demonstrating what Flux looks like.
The Standard Library is not implemented yet, so these programs will not compile.
Warning, do not run this program, or any program resembling it in any language.
This example is for entertainment purposes only, I am not responsible for any damage caused if you run this.
This is a list of keywords which do have LLVM codegen() methods attached to their AST counterparts.
i. All primitive types: int, float, bool, char, data
ii. Type types: union, struct, object - and instances of each
iii. Namespaces
iv. Functions
v. Prototypes / Forward Declarations
vi. if/elif/else
vii. while
viii. asm
By using assembly you can do system calls.
extern for FFI is planned. Please be patient.
Linux instructions:
You will need:
- LLVM Toolchain
- Assembler & Linker
- Python Packages
Verify your installation:
Compilation:
-
Compile Flux to LLVM IR
python3 fc.py input.fx > output.ll -
Compile LLVM IR to assembly
llc output.ll -o output.s -
Assemble to object file
as output.s -o output.o -
Link executable
gcc output.o -o program -
Run ./program
.png)


