|
1 | 1 | [](https://deepwiki.com/kaspanet/rusty-kaspa) |
2 | 2 | <!-- DeepWiki badge generated by https://deepwiki.ryoppippi.com/ --> |
3 | | -<h1>Kaspa On Rust</h1> |
| 3 | +<h1>Kaspa on Rust</h1> |
4 | 4 |
|
5 | 5 | Welcome to the Rust-based implementation of the Kaspa full-node and its ancillary libraries. The contained node release serves as a drop-in replacement to the established <a href="https://github.com/kaspanet/kaspad">Golang node</a> and to date is the recommended node software for the Kaspa network, introducing developers to the possibilities of Rust in the Kaspa network's context. |
6 | 6 |
|
@@ -158,6 +158,52 @@ To build WASM on MacOS you need to install `llvm` from homebrew (at the time of |
158 | 158 |
|
159 | 159 | </details> |
160 | 160 |
|
| 161 | + <details> |
| 162 | + <summary> Building with Docker </summary> |
| 163 | + |
| 164 | + You can build the project using Docker in two ways: a simple single-architecture build, or a multi-architecture build using the provided script. |
| 165 | + |
| 166 | + #### 1. Simple Docker Build |
| 167 | + |
| 168 | + To build for your current architecture (e.g., `linux/amd64`): |
| 169 | + |
| 170 | + ```sh |
| 171 | + docker build -f docker/Dockerfile.kaspad -t kaspad:latest . |
| 172 | + ``` |
| 173 | + |
| 174 | + Replace `Dockerfile.kaspad` with the appropriate Dockerfile for your target (`kaspad`, `kaspa-wallet`, `rothschild`, or `simpa`). |
| 175 | + |
| 176 | + #### 2. Multi-Architecture Build |
| 177 | + |
| 178 | + To build images for multiple architectures (e.g., `linux/amd64` and `linux/arm64`) and optionally push them to a registry, use the `build-docker-multi-arch.sh` script: |
| 179 | + |
| 180 | + ```sh |
| 181 | + ./build-docker-multi-arch.sh --tag <tag> --artifact <artifact> [--arches "<arches>"] [--push] |
| 182 | + ``` |
| 183 | + |
| 184 | + - `--tag <tag>`: **(required)** The Docker image tag to use. |
| 185 | + - `--artifact <artifact>`: The build target/artifact (default: `kaspad`). Must match the Dockerfile name, e.g., `kaspad` for `Dockerfile.kaspad`. |
| 186 | + - `--arches "<arches>"`: Space-separated list of architectures (default: `"linux/amd64 linux/arm64"`). |
| 187 | + - `--push`: If specified, the built images will be pushed to your Docker registry. |
| 188 | + |
| 189 | + **Examples:** |
| 190 | + |
| 191 | + Build and push a multi-arch image for `kaspad`: |
| 192 | + |
| 193 | + ```sh |
| 194 | + ./build-docker-multi-arch.sh --tag myrepo/kaspad:latest --artifact kaspad --push |
| 195 | + ``` |
| 196 | + |
| 197 | + Build a multi-arch image for `kaspa-wallet` without pushing: |
| 198 | + |
| 199 | + ```sh |
| 200 | + ./build-docker-multi-arch.sh --tag kaspa-wallet:test --artifact kaspa-wallet |
| 201 | + ``` |
| 202 | + |
| 203 | + **Note:** |
| 204 | + In order to use `build-docker-multi-arch.sh`, you need Docker with Buildx enabled. |
| 205 | + </details> |
| 206 | + |
161 | 207 | <details> |
162 | 208 |
|
163 | 209 | <summary>Building WASM32 SDK</summary> |
@@ -253,7 +299,7 @@ Start the DevNet node with the following command: |
253 | 299 | cargo run --bin kaspad -- --devnet --enable-unsynced-mining --rpclisten=127.0.0.1 --rpclisten-borsh=127.0.0.1 --utxoindex |
254 | 300 | ``` |
255 | 301 | * `enable-unsynced-mining` is required when the network isn't synchronized, which is the case on the first launch |
256 | | -* `uxtoindex` is required to broadcast mined blocks on this node |
| 302 | +* `uxtoindex` enables the UTXO index, which is necessary for wallet functionality. |
257 | 303 | * `rpclisten-borsh` and `rpclisten-borsh` are likely to be required by mining softwares |
258 | 304 |
|
259 | 305 | note: it will take a bit of time for difficulty to adjust, so you may need to wait a bit before you see blocks being mined consistently. |
|
0 commit comments