Skip to content

Building

Janek Spaderna edited this page Sep 27, 2022 · 1 revision

The supported ways to build AlgST are either

  1. in a Docker image, or
  2. using the stack build tool.

Pre-built docker images can be found at ghcr.io/JaSpa/algst. Refer to Running the Docker image below for further information on the image. Please note though, that instead of the image name algst you will have to give ghcr.io/jaspa/algst:v1.1.0 instead.

Docker Image

  • Prerequisits: Docker, e.g. via Docker Desktop

  • Building:

    ; # From the root of the repository
    ; docker build . -t algst -f utils/Dockerfile

    Building takes about 10 minutes on my machine. Building the image will also run the test suite covering (most) of the parser, type checker and interpreter.

  • Running:

    Try the following to produce basic help output:

    ; docker run --rm -it algst --help

    ⓘ Note

    When using the pre-built images you will have to specify the full URI including the tag instead of the bare image name algst. Above command could look like

    ; docker run --rm -it ghcr.io/jaspa/algst:v1.1.0 --help

    The image will contain the examples/ directory from this repository. The examples are located in the image's working directory. Checking example pt_iast.algst can be achieved with

    ; docker run --rm -it algst pt_flipflop.algst
    Success.

    The algst executable will be set as the image's entry point. Running different commands inside the image is possible using the --entrypoint option to the docker command. For example, listing the included examples is possible with

    ; docker run --rm -it --entrypoint ls algst
    # <List of files here>...

    For further information regarding usage of Docker, e.g. checking files residing on your computer's file system, please refer to Docker's documentation.

Clone this wiki locally