# Build streamview from the source code

Build the streamview program or the container image from the source code, to change streamview or to use a version that has no release.

Source: https://www.eventcatalog.dev/tools/streamview/docs/how-to/build-from-source

Most persons do not need this page. To use streamview, see [Install streamview](https://www.eventcatalog.dev/tools/streamview/docs/how-to/install-streamview).

Build from the source code when you change streamview, or when you want a version that has no release.

## Build the program

You need Rust and the streamview source code.

1. Go to the directory of the source code.
2. Run this command:

```
cargo install --path server
```

The command builds one program, `streamview`, and puts it on your path.
The build adds the `wasm32-unknown-unknown` Rust target if it is not there.

## Build the program but do not install it

1. Go to the directory of the source code.
2. Run `./build.sh`.

The program is then at `target/release/streamview`.

## Run the tests

```
cargo test --workspace
```

## Build the container image

You need only Docker.

```
docker build -t streamview .
```

Then use `streamview` as the image name, where the documentation shows `ghcr.io/event-catalog/streamview`.

## Related

- [How streamview works](https://www.eventcatalog.dev/tools/streamview/docs/explanation/how-streamview-works)
