Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into iconforge-gags-tg
Browse files Browse the repository at this point in the history
  • Loading branch information
itsmeow committed Jan 19, 2025
2 parents f15d452 + 61e61c3 commit adfd0e5
Show file tree
Hide file tree
Showing 3 changed files with 85 additions and 16 deletions.
69 changes: 68 additions & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,35 @@ jobs:
target/i686-win7-windows-msvc/release/rust_g.dll
target/i686-win7-windows-msvc/release/rust_g.pdb
target/rust_g.dm
build-windows-x64:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4

- uses: dtolnay/rust-toolchain@nightly
with:
targets: x86_64-pc-windows-msvc
components: clippy, rustfmt, rust-src

- uses: Swatinem/rust-cache@v2

- name: x64 Clippy (all features)
run: cargo clippy -Z build-std --target x86_64-pc-windows-msvc --features all,allow_non_32bit --locked -- -D warnings

- name: Rustfmt
run: cargo fmt -- --check

- name: x64 Build (release) (default features)
run: cargo build -Z build-std --target x86_64-pc-windows-msvc --features allow_non_32bit --locked --release

- uses: actions/upload-artifact@v4
with:
name: Windows Build x64
path: |
target/x86_64-pc-windows-msvc/release/rust_g.dll
target/x86_64-pc-windows-msvc/release/rust_g.pdb
target/rust_g.dm
build-linux:
runs-on: ubuntu-latest
Expand All @@ -54,7 +83,7 @@ jobs:
- uses: dtolnay/rust-toolchain@nightly
with:
targets: i686-unknown-linux-gnu
targets: i686-unknown-linux-gnu, x86_64-unknown-linux-gnu

- uses: Swatinem/rust-cache@v2

Expand All @@ -78,3 +107,41 @@ jobs:
path: |
target/i686-unknown-linux-gnu/release/librust_g.so
target/rust_g.dm
build-linux-x64:
runs-on: ubuntu-latest
env:
BYOND_MAJOR: 515
BYOND_MINOR: 1642
PKG_CONFIG_ALLOW_CROSS: 1

steps:
- uses: actions/checkout@v4

- run: |
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install libgcc-s1:i386 g++-multilib zlib1g-dev:i386
./scripts/install_byond.sh
- uses: dtolnay/rust-toolchain@nightly
with:
targets: x86_64-unknown-linux-gnu

- uses: Swatinem/rust-cache@v2

- name: x64 Check (all features)
run: cargo check --target x86_64-unknown-linux-gnu --locked --features all,allow_non_32bit

- name: x64 Build (Debug) (all features)
run: cargo build --target x86_64-unknown-linux-gnu --locked --features all,allow_non_32bit

- name: x64 Build (release) (default features)
run: cargo build --target x86_64-unknown-linux-gnu --locked --features allow_non_32bit --release

- uses: actions/upload-artifact@v4
with:
name: Linux Build x64
path: |
target/x86_64-unknown-linux-gnu/release/librust_g.so
target/rust_g.dm
28 changes: 15 additions & 13 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,9 @@ default = [
"dmi",
"file",
"git",
"hash",
"http",
"iconforge",
"json",
"log",
"noise",
Expand All @@ -96,7 +98,9 @@ all = [
"dmi",
"file",
"git",
"hash",
"http",
"iconforge",
"json",
"log",
"noise",
Expand All @@ -107,8 +111,6 @@ all = [
"time",
"toml",
"url",
"hash",
"iconforge",
"pathfinder",
"poissonnoise",
"redis_pubsub",
Expand All @@ -124,17 +126,6 @@ cellularnoise = ["rand", "rayon"]
dmi = ["png", "image", "dep:dmi"]
file = []
git = ["gix", "chrono"]
http = ["ureq", "serde", "serde_json", "once_cell", "jobs"]
json = ["serde", "serde_json"]
log = ["chrono"]
sanitize = ["ammonia", "serde_json"]
sound_len = ["symphonia"]
sql = ["mysql", "serde", "serde_json", "once_cell", "dashmap", "jobs"]
time = []
toml = ["serde", "serde_json", "toml-dep"]
url = ["url-dep", "percent-encoding"]

# additional features
hash = [
"base64",
"const-random",
Expand All @@ -146,6 +137,7 @@ hash = [
"serde",
"serde_json",
]
http = ["ureq", "serde", "serde_json", "once_cell", "jobs"]
iconforge = [
"dashmap",
"dep:dmi",
Expand All @@ -160,6 +152,16 @@ iconforge = [
"tracy_full",
"twox-hash",
]
json = ["serde", "serde_json"]
log = ["chrono"]
sanitize = ["ammonia", "serde_json"]
sound_len = ["symphonia"]
sql = ["mysql", "serde", "serde_json", "once_cell", "dashmap", "jobs"]
time = []
toml = ["serde", "serde_json", "toml-dep"]
url = ["url-dep", "percent-encoding"]

# additional features
pathfinder = ["num-integer", "pathfinding", "serde", "serde_json"]
poissonnoise = ["fast_poisson"]
redis_pubsub = ["flume", "redis", "serde", "serde_json"]
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,9 @@ The default features are:
Mostly used by the asset cache subsystem to improve load times.
* file: Faster replacements for `file2text` and `text2file`, as well as reading or checking if files exist.
* git: Functions for robustly checking the current git revision.
* hash: Faster replacement for `md5`, support for SHA-1, SHA-256, and SHA-512.
* http: Asynchronous HTTP(s) client supporting most standard methods.
* iconforge: A much faster replacement for various bulk DM /icon operations such as [/tg/station]'s asset subsystem spritesheet generation and GAGS bundle generation.
* json: Function to check JSON validity.
* log: Faster log output.
* noise: 2d Perlin noise.
Expand All @@ -110,8 +112,6 @@ The default features are:
Additional features are:
* allow_non_32bit: Disables the forced compile errors on non-32bit targets. Only use this if you know exactly what you are doing.
* batchnoise: Discrete Batched Perlin-like Noise, fast and multi-threaded - sent over once instead of having to query for every tile.
* hash: Faster replacement for `md5`, support for SHA-1, SHA-256, and SHA-512. Requires OpenSSL on Linux.
* iconforge: A much faster replacement for various bulk DM /icon operations such as [/tg/station]'s asset subsystem spritesheet generation and GAGS bundle generation.
* pathfinder: An a* pathfinder used for finding the shortest path in a static node map. Not to be used for a non-static map.
* poissonnoise: A way to generate a 2D poisson disk distribution ('blue noise'), which is relatively uniform.
* redis_pubsub: Library for sending and receiving messages through Redis.
Expand Down

0 comments on commit adfd0e5

Please sign in to comment.