A programming language with JIT compilation, transpilation, and a language server.
Flow is a compiled programming language that runs your code fast. It has:
- JIT compiler for quick execution
- AOT compiler for native binaries
- Transpiler to Java and other languages
- Language server for editor support
- Standard library with common tools
git clone https://github.com/flowlangteam/flow
cd flow/flow_c
cargo build --releaseThe compiler will be at target/release/flow.
Create hello.flow:
func main() -> i64 {
return 42;
}
Run it:
flow run hello.flowflow run myfile.flowflow build myfile.flow -o myprogramflow transpile myfile.flow -t java -o MyProgram.javaflow check myfile.flowflow replfunc add(x: i64, y: i64) -> i64 {
return x + y;
}
func main() -> i64 {
return add(5, 3);
}
func main() -> i64 {
let mut sum = 0;
for i in 0..10 {
sum = sum + i;
}
return sum;
}
struct Point {
x: i64,
y: i64,
}
func main() -> i64 {
let p = Point { x: 10, y: 20 };
return p.x + p.y;
}
The language server provides:
- Syntax highlighting
- Error checking
- Code completion
- Go to definition
- Find references
- Hover information
Build the LSP server:
cd flow_c
cargo build --package flow_lsp --releaseThe binary will be at target/release/flow-lsp.
Flow can run on the JVM and call Java code. See interop/java/ for details.
- Rust toolchain (latest stable)
- Cargo
cd flow_c
cargo build --releasecargo build --package flow_cli --release
cargo build --package flow_lsp --releasecd flow_c
cargo testMIT License - see LICENSE for details.
Issues and pull requests are welcome.