Skip to content

Commit

Permalink
feat(map): initial commit (#246)
Browse files Browse the repository at this point in the history
  • Loading branch information
cakekindel authored Mar 8, 2023
1 parent 6f7d5d7 commit e8ee477
Show file tree
Hide file tree
Showing 10 changed files with 747 additions and 41 deletions.
52 changes: 30 additions & 22 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions release-please-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,16 @@
"extra-files": ["src/lib.rs"],
"prerelease": true
},
"toad-map": {
"package-name": "toad-map",
"changelog-path": "CHANGELOG.md",
"release-type": "rust",
"bump-minor-pre-major": true,
"bump-patch-for-minor-pre-major": false,
"draft": false,
"extra-files": ["src/lib.rs"],
"prerelease": true
},
"toad-array": {
"package-name": "toad-array",
"changelog-path": "CHANGELOG.md",
Expand Down
2 changes: 1 addition & 1 deletion toad-hash/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ use blake2::{Blake2b, Digest};
/// ```
/// use core::hash::{Hash, Hasher};
///
/// use toad_common::hash::Blake2Hasher;
/// use toad_hash::Blake2Hasher;
///
/// let mut hasher_a = Blake2Hasher::new();
/// let mut hasher_b = Blake2Hasher::new();
Expand Down
1 change: 1 addition & 0 deletions toad-map/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

26 changes: 26 additions & 0 deletions toad-map/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
[package]
name = "toad-map"
version = "0.0.0"
edition = "2021"
description = "Map / Dictionary trait that is no_std and heap-allocator-optional"
authors = ["Orion Kindel <[email protected]>"]
license = "MIT OR Apache-2.0"
homepage = "https://github.com/clov-coffee/toad/toad"
repository = "https://github.com/clov-coffee/toad/toad"
readme = "README.md"
keywords = ["coap", "iot", "networking", "no_std", "wasm"]
categories = ["network-programming"]

[badges]
maintenance = { status = "actively-developed" }

[features]
default = ["std"]
std = ["alloc", "toad-len/std"]
alloc = ["toad-len/alloc"]
test = []
docs = []

[dependencies]
tinyvec = {version = "1.5", default_features = false, features = ["rustc_1_55"]}
toad-len = {version = "0.1.1", default_features = false}
32 changes: 32 additions & 0 deletions toad-map/Makefile.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
extend = "../Makefile.toml"

[tasks.bench]
install_crate = "cargo-criterion"
command = "cargo"
args = ["criterion"]

[tasks.flame]
install_crate = "cargo-flamegraph"
command = "cargo"
args = ["flamegraph", "--bench", "profile", "--", "--bench"]

[tasks.check-no-std]
command = "cargo"
args = ["check", "--no-default-features"]

[tasks.check-alloc]
command = "cargo"
args = ["check", "--no-default-features", "--features", "alloc"]

[tasks.ci]
dependencies = ["test", "fmt-check", "clippy-check", "check-no-std", "check-alloc"]

[tasks.tdd]
install_crate = "cargo-watch"
command = "cargo"
args = [ "watch"
, "--clear"
, "--watch", "toad-TODO/src"
, "--delay", "0"
, "-x", "make --cwd toad-TODO -t test-quiet --loglevel error"
]
24 changes: 24 additions & 0 deletions toad-map/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[![crates.io](https://img.shields.io/crates/v/toad-TODO.svg)](https://crates.io/crates/toad-TODO)
[![docs.rs](https://docs.rs/toad-TODO/badge.svg)](https://docs.rs/toad-TODO/latest)
![Maintenance](https://img.shields.io/badge/maintenance-activly--developed-brightgreen.svg)

# toad-map

This microcrate contains a `Map` trait that generalizes `HashMap` semantics
to `std`, `alloc` and `no_std` platforms.

## License

Licensed under either of

* Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or https://www.apache.org/licenses/LICENSE-2.0)
* MIT license ([LICENSE-MIT](LICENSE-MIT) or https://opensource.org/licenses/MIT)

at your option.

### Contribution

Unless you explicitly state otherwise, any contribution intentionally
submitted for inclusion in the work by you, as defined in the Apache-2.0
license, shall be dual licensed as above, without any additional terms or
conditions.
23 changes: 23 additions & 0 deletions toad-map/README.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
[![crates.io](https://img.shields.io/crates/v/toad-TODO.svg)](https://crates.io/crates/toad-TODO)
[![docs.rs](https://docs.rs/toad-TODO/badge.svg)](https://docs.rs/toad-TODO/latest)
{{badges}}

# {{crate}}

{{readme}}

## License

Licensed under either of

* Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or https://www.apache.org/licenses/LICENSE-2.0)
* MIT license ([LICENSE-MIT](LICENSE-MIT) or https://opensource.org/licenses/MIT)

at your option.

### Contribution

Unless you explicitly state otherwise, any contribution intentionally
submitted for inclusion in the work by you, as defined in the Apache-2.0
license, shall be dual licensed as above, without any additional terms or
conditions.
Loading

0 comments on commit e8ee477

Please sign in to comment.