-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
48 changed files
with
3,674 additions
and
3,631 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{ | ||
"problemMatcher": [ | ||
{ | ||
"owner": "rust-common", | ||
"pattern": [ | ||
{ | ||
"regexp": "^(warning|warn|error)(\\[(.*)\\])?: (.*)$", | ||
"severity": 1, | ||
"message": 4, | ||
"code": 3 | ||
}, | ||
{ | ||
"regexp": "^([\\s->=]*(.*):(\\d*):(\\d*)|.*)$", | ||
"file": 2, | ||
"line": 3, | ||
"column": 4 | ||
} | ||
] | ||
}, | ||
{ | ||
"owner": "cargo-fmt", | ||
"pattern": [ | ||
{ | ||
"regexp": "^(Diff in (\\S+)) at line (\\d+):", | ||
"message": 1, | ||
"file": 2, | ||
"line": 3 | ||
} | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,153 @@ | ||
name: Checks | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- next | ||
- lazer | ||
pull_request: | ||
|
||
jobs: | ||
build-docs: | ||
name: Build docs | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v4 | ||
|
||
- name: Cache dependencies | ||
uses: Swatinem/rust-cache@v2 | ||
|
||
- name: Install nightly toolchain | ||
uses: dtolnay/rust-toolchain@nightly | ||
|
||
- name: Build docs | ||
env: | ||
RUSTDOCFLAGS: --cfg docsrs | ||
run: cargo doc --no-deps --all-features | ||
|
||
clippy: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
include: | ||
- kind: default-features | ||
features: default | ||
- kind: full-features | ||
features: cache,macros,metrics,replay,serialize,local_oauth | ||
|
||
steps: | ||
- name: Checkout project | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install stable toolchain | ||
uses: dtolnay/rust-toolchain@stable | ||
|
||
- name: Cache dependencies | ||
uses: Swatinem/rust-cache@v2 | ||
|
||
- name: Add problem matchers | ||
run: echo "::add-matcher::.github/rust.json" | ||
|
||
- name: Run clippy | ||
run: cargo clippy --features ${{ matrix.features }} --all-targets | ||
|
||
rustfmt: | ||
name: Format | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install nightly toolchain | ||
uses: dtolnay/rust-toolchain@v1 | ||
with: | ||
components: rustfmt | ||
toolchain: nightly | ||
|
||
- name: Add problem matchers | ||
run: echo "::add-matcher::.github/rust.json" | ||
|
||
- name: Check code formatting | ||
run: cargo fmt -- --check | ||
|
||
feature-combinations: | ||
name: Feature combinations | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout project | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install stable toolchain | ||
uses: dtolnay/rust-toolchain@stable | ||
|
||
- name: Cache dependencies | ||
uses: Swatinem/rust-cache@v2 | ||
|
||
- name: Add problem matchers | ||
run: echo "::add-matcher::.github/rust.json" | ||
|
||
- name: Install cargo-hack | ||
uses: taiki-e/install-action@cargo-hack | ||
|
||
- name: Check feature-combinations | ||
run: > | ||
cargo hack check | ||
--feature-powerset --no-dev-deps | ||
--optional-deps metrics | ||
--group-features default,cache,macros,local_oauth,deny_unknown_fields | ||
readme: | ||
name: Readme | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout project | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install stable toolchain | ||
uses: dtolnay/rust-toolchain@stable | ||
|
||
- name: Cache dependencies | ||
uses: Swatinem/rust-cache@v2 | ||
|
||
- name: Check if README is up to date | ||
run: | | ||
cargo install cargo-rdme | ||
cargo rdme --check | ||
test: | ||
name: Tests | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout project | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install stable toolchain | ||
uses: dtolnay/rust-toolchain@stable | ||
|
||
- name: Cache dependencies | ||
uses: Swatinem/rust-cache@v2 | ||
|
||
- name: Add problem matchers | ||
run: echo "::add-matcher::.github/rust.json" | ||
|
||
- name: Install nextest | ||
uses: taiki-e/install-action@nextest | ||
|
||
- name: Run tests with nextest | ||
run: > | ||
cargo nextest run | ||
--all-features | ||
--no-fail-fast | ||
--failure-output "immediate-final" | ||
--filter-expr 'not binary(requests)' | ||
- name: Run doctests | ||
run: cargo test --doc --all-features |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
/target | ||
.env | ||
/Cargo.lock | ||
/.idea | ||
output.txt | ||
Cargo.lock | ||
output.* | ||
expanded.* | ||
/tests/custom.rs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,63 @@ | ||
[package] | ||
name = "rosu-v2" | ||
version = "0.8.0" | ||
authors = ["MaxOhn <[email protected]>"] | ||
edition = "2018" | ||
version = "0.9.0" | ||
description = "An osu! API v2 wrapper" | ||
license = "MIT" | ||
readme = "README.md" | ||
keywords = ["osu", "api", "wrapper"] | ||
repository = "https://github.com/MaxOhn/rosu-v2" | ||
documentation = "https://docs.rs/rosu-v2/" | ||
authors = ["MaxOhn <[email protected]>"] | ||
edition = "2021" | ||
license = "MIT" | ||
|
||
# --- Features --- | ||
|
||
[features] | ||
default = ["cache"] | ||
serialize = [] | ||
default = ["cache", "macros"] | ||
cache = ["dashmap"] | ||
metrics = ["prometheus"] | ||
macros = ["rosu-mods/macros"] | ||
replay = ["osu-db"] | ||
serialize = [] | ||
local_oauth = ["tokio/net"] | ||
deny_unknown_fields = [] | ||
|
||
# --- Dependencies --- | ||
|
||
[dependencies] | ||
bitflags = { version = "1.0", default-features = false } | ||
bytes = { version = "1.0", default-features = false } | ||
futures = { version = "0.3", default-features = false } | ||
leaky-bucket-lite = { version = "0.5" } | ||
log = { version = "0.4", default-features = false } | ||
hyper = { version = "0.14", default-features = false, features = ["client"] } | ||
hyper-rustls = { version = "0.23", default-features = false, features = ["http1", "http2", "native-tokio"] } | ||
serde = { version = "1.0", default-features = false, features = ["derive"] } | ||
serde_json = { version = "1.0", default-features = false, features = ["std"] } | ||
smallstr = { version = "0.2", features = ["serde"] } | ||
hyper-rustls = { version = "0.24.1", default-features = false, features = ["http1", "http2", "native-tokio"] } | ||
itoa = { version = "1.0.9" } | ||
rosu-mods = { version = "0.1.0", features = ["serde"] } | ||
serde = { version = "1.0.203", default-features = false, features = ["derive"] } | ||
serde_json = { version = "1.0", default-features = false, features = ["std", "raw_value"] } | ||
serde_urlencoded = { version = "0.7.1" } | ||
smallstr = { version = "0.3.0", features = ["serde"] } | ||
thiserror = { version = "1.0" } | ||
time = { version = "0.3", features = ["formatting", "parsing"] } | ||
tokio = { version = "1.0", default-features = false, features = ["macros"] } | ||
tracing = { version = "0.1.40", default-features = false } | ||
url = { version = "2.0", default-features = false } | ||
|
||
# --- Feature dependencies --- | ||
|
||
dashmap = { version = "5.1", default-features = false, optional = true } | ||
dashmap = { version = "6.0.1", default-features = false, optional = true } | ||
osu-db = { version = "0.3.0", optional = true } | ||
prometheus = { version = "0.13", optional = true } | ||
rkyv = { version = "0.7", optional = true } | ||
metrics = { version = "0.23.0", optional = true } | ||
|
||
# --- Dev dependencies --- | ||
|
||
[dev-dependencies] | ||
dotenv = { version = "0.15" } | ||
env_logger = { version = "0.9" } | ||
dotenvy = { version = "0.15" } | ||
eyre = { version = "0.6" } | ||
once_cell = { version = "1.7" } | ||
tokio = { version = "1.0", default-features = false, features = ["rt", "macros"] } | ||
tracing-subscriber = { version = "0.3.18", default-features = false, features = ["env-filter", "fmt", "smallvec"] } | ||
|
||
# --- Metadata --- | ||
|
||
[package.metadata.docs.rs] | ||
all-features = true | ||
rustdoc-args = ["--cfg", "docsrs"] |
Oops, something went wrong.