❗ The BLOCKY Compiler is provided with no guarantees. By trying out the repo, binary or invoking the
bky-cexecutable you agree to not hold BLOCKY responsible for any problems, mishaps, adverse effects, or frustrations.
WASM (reproducible) compilation tool
To install the latest version run:
curl -s https://raw.githubusercontent.com/blocky/compiler/refs/heads/main/install.sh | bashTo install a specific version run:
curl -s https://raw.githubusercontent.com/blocky/compiler/refs/heads/main/install.sh | bash -s -- -v <selected-version>for example:
curl -s https://raw.githubusercontent.com/blocky/compiler/refs/heads/main/install.sh | bash -s -- -v v0.1.0-beta.1
To build your go application into WASM use bky-c build command:
bky-c build <path-to-your-app> <path-to-output-binary-file>for example
bky-c build ./main.go ./out/x.wasmplease note that:
<path-to-your-app> can be either relative and absolute and point to:
- an input file, or
- an input/project folder
You also need to make sure thar the folder in which you wish to put the output binary exists. The compiler will not create the folder for you.
To display all licenses associated with bky-c and its dependencies run:
bky-c licensesFor development and testing you should use the provided Nix environment.
To run it:
nix developIn order to run or debug tests (integration, compatibility, any ending in -dind) in an isolated
docker-in-docker setup you need to enable multiplatform builds via docker build buildx.
If you need to enable it you may want to look at the following target:
make container-setupTo debug a test Test_MyCode using a container with a dedicated Docker daemon run:
make start-debug-env-dind testname=Test_MyCodeWhen you see something similar on your terminal:
Waiting for breakpoint in test: Test_MyCode
API server listening at: [::]:2345
2025-06-08T18:58:43Z warning layer=rpc Listening for remote connections (connections are not authenticated nor encrypted)
you can start a test debug run from your IDE. In Goland standard Go Remote test run configuration will be ok.
To run integration tests inside a container with a dedicated Docker daemon run:
make test-integration-dindTo run compatibility tests inside a container with a dedicated Docker daemon run:
make test-compatibility-dind