Skip to content

Commit

Permalink
perf: use target=native in docker build (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewgazelka authored Mar 21, 2024
1 parent f0b9283 commit 25eaf2c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ COPY server/Cargo.toml ./server/Cargo.toml
COPY server/src ./server/src


# Build the source code using Rust Nightly
# Build the source code using Rust Nightly with
RUN --mount=type=cache,target=/usr/local/cargo/registry \
--mount=type=cache,target=/app/target \
cargo build --release --locked -p server
RUSTFLAGS='-C target-cpu=native' cargo build --release --locked -p server

# Copy the built executable from the cache to a clean directory
RUN --mount=type=cache,target=/app/target \
Expand Down
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,16 @@
How can we get 10k players to PvP at once on a Minecraft server to break the Guinness World Record?

![image](https://github.com/andrewgazelka/mc-server/assets/7644264/5cb83738-3e85-47e9-b73c-40e75257c5a3)


# Running

```bash
docker compose up
```

# Internals

![image](https://github.com/andrewgazelka/mc-server/assets/7644264/8fb3cd33-4dd7-42fc-a3e0-17e167c64509)
![image](https://github.com/andrewgazelka/mc-server/assets/7644264/5272317f-48c3-4e15-a032-73d9229a4413)

Expand Down

0 comments on commit 25eaf2c

Please sign in to comment.