Run ./scripts/build.sh or just build to build to project in to ./build folder.
Run just install or the OS specific script:
- linux:
./scripts/install-linux.sh - macos:
./scripts/install-macos.sh - windows:
.\scripts\install-windows.cmd
Run ./scripts/test.sh or just test to run the tests in ./test folder.
./scripts/test.sh PATTERNRun ./scripts/test.sh --update or just test-update to run the tests and update the snapshot files.
./scripts/test.sh PATTERN --updateRun ./scripts/coverage.sh or just coverage to generate code coverage data.
Requires: lcov
./scripts/coverage.shOutputs lcov.info at the root of the project.
Run ./sciprts/build-tests.sh && ./scripts/unit.sh or just unit to run the unit tests.
Run ./scripts/build-tests.sh or just build-tests to build the unit tests.
./scripts/run-example.sh fib 30
./scripts/run-example.sh hello WorldRun ./scripts/clean.sh or just clean to remove build artifacts.
- Updates
VERSION.txt - Updates
tests/native_functions/native_fn_version_call.lox.outtest snapshot - Creates
vVERSIONtag e.g.v0.1.0,v2.5.0 - Commits updated
VERSION.txtandtests/native_functions/native_fn_version_call.lox.out - Push tag and commits
./scripts/increment-version.sh -M # Increment major
./scripts/increment-version.sh -m # Increment minor
./scripts/increment-version.sh -p # Increment patchRun ./scripts/cmake.sh or just cmake to generate make files for the project.
Different build definitions can be updated in CMakeLists.txt run just cmake && just build.
Setting DEBUG_PRINT_CODE will print disassembled bytecode.
Setting DEBUG_TRACE_EXECUTION will print execution trace logs.
The current language version is defined in the VERSION.txt file.
The src/version.c is generated automatically when the project is built. You can also generate/update the src/version.c file explicit.
./scripts/generate_version_c.sh
just generate_version_c