Reference
Running Programs
Running from File
Pass the path to a .vel file (paths resolve from the repository root):
./gradlew :velo-cli:run --args="velo-cli/src/main/resources/hello.vel"
./gradlew :velo-cli:run --args="velo-cli/src/main/resources/primes-range.vel"import paths are resolved relative to the importing file; standard-library modules (import "std/map") are bundled with the compiler, so they need no files next to your program.
Compiling to Bytecode
A second argument compiles the program to a .vbc bytecode file instead of running it; a .vbc file as the first argument runs pre-compiled bytecode:
./gradlew :velo-cli:run --args="velo-cli/src/main/resources/hello.vel hello.vbc"
./gradlew :velo-cli:run --args="hello.vbc"Example Programs
The project includes many examples in velo-cli/src/main/resources/:
hello.vel— Hello, Worldfibonacci-recursive.vel— Recursive Fibonacci algorithmprimes-range.vel— Prime number searchlzw.vel— LZW compression algorithmhuffman.vel— Huffman compression algorithmclass.vel— Class usage examplesext.vel— Extension function exampleshttp-example.vel— HTTP request examplesfilesystem-example.vel— File operations examples