Skip to content

Commit

Permalink
Merge pull request #37 from ckcr4lyf/feature/docs
Browse files Browse the repository at this point in the history
Add some docs on building and readme
  • Loading branch information
ckcr4lyf authored May 18, 2023
2 parents 4ebccd0 + 7097248 commit b031533
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 12 deletions.
12 changes: 0 additions & 12 deletions Makefile

This file was deleted.

37 changes: 37 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,40 @@ Many thanks to horsie and anon from Discord, both of whom were extremely helpful
## Usage

The current release can be considered stable, but is not intended for use by others - it is not very customizable yet. That said, feel free to hack around with it if you like!

### Building

Best to build in release mode and target your CPU natively for better performance.

```
$ RUSTFLAGS="-C target-cpu=native" cargo build --release
```

Building a static binary is possible with the `musl` target, with something like:

```
$ cargo build --target=x86_64-unknown-linux-musl --release
```

### ulimits

Make sure you set a high ulimit for open files! By default some VPS might set this to 1024, and then `kiryuu` won't be able to handle high traffic.

If you've already started kiryuu, you can identify its PID and then set it via:

```
$ prlimit --pid PID_HERE --nofile=16384:16384
```

## Testing

There are integration tests via Gauge that run in CI. The tests are located at https://github.com/ckcr4lyf/kiryuu-gauge

To run them locally, you could use:

```
$ docker run -e KIRYUU_HOST=http://172.17.0.1:6969 -e REDIS_HOST=redis://172.17.0.1:6379 ghcr.io/ckcr4lyf/kiryuu-gauge:master
```

(Make sure you've kiryuu running locally and redis as well!)

0 comments on commit b031533

Please sign in to comment.