Harlock is a small language with a focus on binary data manipulation and data embedding in executables, mainly usable as a scripting language for binaries post-processing. It is based around the ideas discussed in the Writing An Interpreter In Go book by Thorsten Ball.
To get started on how to use harlock for your builds or as a standalone tools, please refer to the harlock wiki!
You can download the latest pre-built binaries for your architecture/os from the harlock release page.
If you have installed the go toolchain, you can directly install the interpeter using the following command:
go install github.com/Abathargh/harlock/cmd/harlock@latest
Changing the latest
bit in the URL with the version you desire to download, if you do not want the latest one.
Required: Go 1.18+
Builds are executed using the linker flags to strip the debug symbols from the binaries, to achieve smaller sized executables.
make build # build in place
make install # build and install in $GOPATH/bin
harlock script.hlk
harlock
Harlock v0.4.1 - amd64 on linux
>>> var hello = "Hello World!"
>>> print(hello)
Hello World!
You can embed a harlock script into an executable together with the harlock runtime:
harlock -embed script.hlk
Harlock is licensed under the terms of the MIT License.