-
Notifications
You must be signed in to change notification settings - Fork 0
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
8 changed files
with
168 additions
and
42 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
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,19 +1,29 @@ | ||
[package] | ||
name = "delta-encoding" | ||
version = "0.4.0" | ||
description = "A library to encode and decode a delta-encoded stream of numbers" | ||
authors = ["Yuri Astrakhan <[email protected]>"] | ||
repository = "https://github.com/nyurik/delta-encoding" | ||
edition = "2021" | ||
license = "MIT OR Apache-2.0" | ||
description = "A library to encode and decode a delta-encoded stream of numbers" | ||
repository = "https://github.com/nyurik/delta-encoding" | ||
keywords = ["delta-encoding", "encoding", "encoder", "decoder", "protobuf"] | ||
categories = ["encoding"] | ||
rust-version = "1.78.0" | ||
|
||
[dependencies] | ||
num-traits = "0.2" | ||
|
||
[dev-dependencies] | ||
criterion = { version = "0.3", features = ["html_reports"] } | ||
criterion = { version = "0.5", features = ["html_reports"] } | ||
|
||
[[bench]] | ||
name = "encoder" | ||
harness = false | ||
|
||
[lints.rust] | ||
unsafe_code = "forbid" | ||
unused_qualifications = "warn" | ||
|
||
[lints.clippy] | ||
pedantic = { level = "warn", priority = -1 } | ||
module_name_repetitions = "allow" |
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
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,68 @@ | ||
#!/usr/bin/env just --justfile | ||
|
||
@_default: | ||
just --list | ||
|
||
# Clean all build artifacts | ||
clean: | ||
cargo clean | ||
rm -f Cargo.lock | ||
|
||
update: | ||
cargo +nightly -Z unstable-options update --breaking | ||
cargo update | ||
|
||
# Run cargo clippy | ||
clippy: | ||
cargo clippy --workspace --all-targets -- -D warnings | ||
|
||
# Test code formatting | ||
test-fmt: | ||
cargo fmt --all -- --check | ||
|
||
# Run cargo fmt | ||
fmt: | ||
cargo +nightly fmt -- --config imports_granularity=Module,group_imports=StdExternalCrate | ||
|
||
# Build and open code documentation | ||
docs: | ||
cargo doc --no-deps --open | ||
|
||
# Quick compile | ||
check: | ||
RUSTFLAGS='-D warnings' cargo check --workspace --all-targets | ||
|
||
# Run all tests | ||
test: | ||
RUSTFLAGS='-D warnings' cargo test --workspace --all-targets | ||
|
||
# Test documentation | ||
test-doc: | ||
cargo test --doc | ||
RUSTDOCFLAGS="-D warnings" cargo doc --no-deps | ||
|
||
rust-info: | ||
rustc --version | ||
cargo --version | ||
|
||
# Run all tests as expected by CI | ||
ci-test: rust-info test-fmt clippy check test test-doc | ||
|
||
# Run minimal subset of tests to ensure compatibility with MSRV | ||
ci-test-msrv: rust-info check test | ||
|
||
# Verify that the current version of the crate is not the same as the one published on crates.io | ||
check-if-published: | ||
#!/usr/bin/env bash | ||
LOCAL_VERSION="$(grep '^version =' Cargo.toml | sed -E 's/version = "([^"]*)".*/\1/')" | ||
echo "Detected crate version: $LOCAL_VERSION" | ||
CRATE_NAME="$(grep '^name =' Cargo.toml | head -1 | sed -E 's/name = "(.*)"/\1/')" | ||
echo "Detected crate name: $CRATE_NAME" | ||
PUBLISHED_VERSION="$(cargo search ${CRATE_NAME} | grep "^${CRATE_NAME} =" | sed -E 's/.* = "(.*)".*/\1/')" | ||
echo "Published crate version: $PUBLISHED_VERSION" | ||
if [ "$LOCAL_VERSION" = "$PUBLISHED_VERSION" ]; then | ||
echo "ERROR: The current crate version has already been published." | ||
exit 1 | ||
else | ||
echo "The current crate version has not yet been published." | ||
fi |
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
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