documentation

Signed-off-by: eternal-flame-AD <yume@yumechi.jp>
This commit is contained in:
ゆめ 2024-11-15 22:31:11 -06:00
parent 0a08ea64e5
commit 17b015796d
No known key found for this signature in database
2 changed files with 7 additions and 3 deletions

View file

@ -53,12 +53,16 @@ Image:
2. Test run with `cargo run --features env-local -- -c local.toml`. Additional features `apparmor` and `reuse-port` are available for Linux users.
3. Build with `cargo build --features env-local --profile release-local`. The built binary will be in `target/release-local/yumechi-no-kuni-proxy-worker`.
3. Build with `cargo build --features env-local --profile release-local`. The built binary will be in `target/release-local/yumechi-no-kuni-proxy-worker`. You can consider setting `RUSTFLAGS="-Ctarget-cpu=native"` for better performance.
4. The only flag understood is `-c` for the configuration file. The configuration file is in TOML format. However, the `RUST_LOG` environment variable will change the log level. The log level is `info` by default if the environment variable is not set.
IF deploying to Cloudflare Workers:
Firstly I don't recommend deploying using the free plan because there are much faster implementations that do not or almost do not perform any Image processing. I have this feature mainly because I don't want to pay for a Cloudflare Workers plan just to support this.
The reported CPU time by Cloudflare is consistently over the free plan limit (which is only 10ms! probably not even enough for decoding an image) and will likely be throttled or terminated once you deploy it to real workloads. The paid plan is recommended for this worker.
5. Add the wasm target with `rustup +$(cat rust-toolchain) target add wasm32-unknown-unknown`.
6. Have a working JS environment.

View file

@ -21,5 +21,5 @@ allow_svg_passthrough = false
[rate_limit]
max_x_forwarded_for = 0
replenish_every = 2000
burst = 32
replenish_every = 200
burst = 64