-
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
0 parents
commit 194bcd1
Showing
26 changed files
with
4,444 additions
and
0 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,99 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
RUSTFLAGS: -Dwarnings | ||
RUST_BACKTRACE: 1 | ||
RUST_LOG: blazemap | ||
|
||
jobs: | ||
fmt: | ||
name: "Fmt" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- run: rustup show active-toolchain -v | ||
- run: rustup component add rustfmt | ||
- run: cargo fmt --version | ||
- run: cargo fmt -- --check | ||
|
||
build: | ||
name: "Build" | ||
needs: fmt | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Build project | ||
run: cargo build --all-targets --all-features | ||
|
||
docs: | ||
name: "Docs" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Build Documentation | ||
run: cargo doc --all --no-deps --release | ||
|
||
clippy: | ||
name: "Clippy" | ||
needs: fmt | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Add clippy | ||
run: rustup component add clippy | ||
- name: Clippy version | ||
run: cargo clippy --version | ||
- name: Run clippy | ||
run: cargo clippy | ||
- name: Run clippy with all features | ||
run: cargo clippy --all-targets --all-features | ||
- name: Run clippy on tests | ||
run: cargo clippy --tests --all-targets --all-features | ||
|
||
tests: | ||
name: "Tests" | ||
needs: build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Run tests | ||
run: cargo test | ||
- name: Run tests with all features | ||
run: cargo test --all-features | ||
- name: Run tests with all features in release mode | ||
run: cargo test --all-features --release | ||
|
||
loom: | ||
name: "Loom" | ||
needs: build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- run: rustup show active-toolchain -v | ||
- run: ./tests/loom.sh | ||
|
||
miri: | ||
name: "Miri" | ||
needs: clippy | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Install Miri | ||
run: | | ||
rustup toolchain install nightly --component miri | ||
rustup override set nightly | ||
cargo miri setup | ||
- name: Run tests with Miri | ||
run: cargo miri test --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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Generated by Cargo | ||
# will have compiled files and executables | ||
debug/ | ||
target/ | ||
|
||
# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries | ||
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html | ||
Cargo.lock | ||
|
||
# These are backup files generated by rustfmt | ||
**/*.rs.bk | ||
|
||
# MSVC Windows builds of rustc generate these, which store debugging information | ||
*.pdb | ||
|
||
# macOS Finder files | ||
.DS_Store | ||
|
||
# JetBrains files | ||
.idea/ |
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,39 @@ | ||
[package] | ||
name = "blazemap" | ||
version = "0.3.0" | ||
authors = ["Andrew Sonin <[email protected]>"] | ||
categories = ["data-structures"] | ||
description = """ | ||
Implements a vector-based slab-like map with an interface similar to that of HashMap, \ | ||
and also provides tools for generating lightweight identifiers that can be type-safely used as keys for this map. | ||
""" | ||
keywords = ["map", "slab", "hashmap"] | ||
license = "MIT" | ||
repository = "https://github.com/andrewsonin/blazemap" | ||
readme = "README.md" | ||
edition = "2021" | ||
|
||
[lints.rust] | ||
rust_2018_idioms = "warn" | ||
unreachable_pub = "warn" | ||
missing_docs = "warn" | ||
missing_debug_implementations = "warn" | ||
|
||
[lints.clippy] | ||
pedantic = { level = "warn", priority = -1 } | ||
|
||
[dependencies] | ||
once_cell = "1" | ||
parking_lot = "0.12" | ||
serde = { version = "1", optional = true, features = ["derive"] } | ||
|
||
[target.'cfg(loom)'.dependencies] | ||
loom = { version = "0.7", features = ["checkpoint"] } | ||
|
||
[dev-dependencies] | ||
rand = "0.8" | ||
serde_json = "1" | ||
static_assertions = "1" | ||
|
||
[features] | ||
serde = ["dep:serde"] |
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,4 @@ | ||
# blazemap | ||
|
||
_Implements a vector-based slab-like map with an interface similar to that of `HashMap`, | ||
and also provides tools for generating lightweight identifiers that can be type-safely used as keys for this map._ |
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,2 @@ | ||
/// Defines [`BlazeMap`](crate::prelude::BlazeMap). | ||
pub mod blazemap; |
Oops, something went wrong.