Skip to content

Commit 7c2b573

Browse files
committed
add cargo meta
1 parent a74c8fc commit 7c2b573

File tree

3 files changed

+31
-12
lines changed

3 files changed

+31
-12
lines changed

Cargo.toml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,19 @@
22
edition = "2021"
33
name = "lowestbins"
44
version = "1.3.0"
5+
authors = ["Tricked-dev <tricked@tricked.pro>"]
6+
description = "Lowestbins made in rust for maximum efficiency"
7+
repository = "https://github.com/tricked-dev/lowestbins"
8+
documentation = "https://docs.rs/lowestbins"
9+
readme = "README.md"
10+
license = "APACHE-2.0"
11+
homepage = "https://lb.tricked.pro"
12+
categories = ["command-line-utilities"]
13+
exclude = [
14+
".vscode/settings.json",
15+
"makefile",
16+
]
17+
518

619
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
720
[features]
@@ -12,6 +25,12 @@ local = []
1225
[profile.release]
1326
lto = true
1427
strip = true
28+
codegen-units = 1
29+
incremental = true
30+
opt-level = 'z'
31+
32+
[profile.release.package."*"]
33+
opt-level = 3
1534

1635
[build-dependencies]
1736
colored = "2.0"

build.rs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,12 @@ fn main() {
2727
fs::write(format!("{}/logo.txt", &env::var("OUT_DIR").unwrap()), res).unwrap();
2828
let output = format!("{}/sellprices.json", &env::var("OUT_DIR").unwrap());
2929
println!("cargo:rerun-if-changed={}", output);
30-
let _cmd = Command::new("curl")
31-
.arg("-o")
32-
.arg(output)
33-
.arg(LOC)
34-
.output()
35-
.expect("failed to execute process");
30+
if fs::read(&output).is_err() {
31+
let _cmd = Command::new("curl")
32+
.arg("-o")
33+
.arg(output)
34+
.arg(LOC)
35+
.output()
36+
.expect("failed to execute process");
37+
}
3638
}

src/lib.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
1+
#![doc = include_str!("../README.md")]
2+
13
pub mod bazaar;
24
pub mod fetch;
35
pub mod nbt_utils;
46
pub mod server;
57
pub mod webhook;
68

7-
use std::{collections::HashMap, env, fs, sync::Mutex, time::Duration};
9+
use std::{collections::HashMap, env, fs, sync::Mutex};
810

9-
use isahc::{
10-
config::{NetworkInterface, VersionNegotiation},
11-
prelude::*,
12-
HttpClient,
13-
};
11+
use isahc::HttpClient;
1412

1513
const UPDATE_SECONDS: &str = "UPDATE_SECONDS";
1614
const SAVE_TO_DISK: &str = "SAVE_TO_DISK";

0 commit comments

Comments
 (0)