Procházet zdrojové kódy

chore: miscellaneous pre-release prep (#47)

* chore: add cargo metadata
* chore: add readme badges
* bump parking_lot
* docs: add sponsorship badges
* chore: add `clog` config and changelog
* chore: fix readme build status badges

Signed-off-by: Eliza Weisman <eliza@buoyant.io>
Eliza Weisman před 3 roky
rodič
revize
5d24a27458
5 změnil soubory, kde provedl 98 přidání a 6 odebrání
  1. 18 0
      .clog.toml
  2. 46 0
      CHANGELOG.md
  3. 10 3
      Cargo.toml
  4. 23 0
      README.md
  5. 1 3
      bench/Cargo.toml

+ 18 - 0
.clog.toml

@@ -0,0 +1,18 @@
+[clog]
+# A repository link with the trailing '.git' which will be used to generate
+# all commit and issue links
+repository = "https://github.com/hawkw/thingbuf"
+
+# specify the style of commit links to generate, defaults to "github" if omitted
+link-style = "github"
+
+# The preferred way to set a constant changelog. This file will be read for old changelog
+# data, then prepended to for new changelog data. It's the equivilant to setting
+# both infile and outfile to the same file.
+#
+# Do not use with outfile or infile fields!
+#
+# Defaults to stdout when omitted
+changelog = "CHANGELOG.md"
+
+from-latest-patch = true

+ 46 - 0
CHANGELOG.md

@@ -0,0 +1,46 @@
+<a name="0.1.0"></a>
+## 0.1.0 (2022-03-15)
+
+Initial release!
+
+#### Performance
+
+* **mpsc:**  rewrite and optimize wait queue (#22) ([8c882b0f](https://github.com/hawkw/thingbuf/commit/8c882b0f40b5b79b1d27116920769bd184d216be))
+* **mspc:**  replace bad VecDeque wait queue with intrusive list (#16) ([23f4c96f](https://github.com/hawkw/thingbuf/commit/23f4c96fa4e88aa2183f75c9afd929ca98f06fe5))
+
+#### Features
+
+*   add `#[must_use]` to constructors (#45) ([0299a606](https://github.com/hawkw/thingbuf/commit/0299a6064d31752ed50c49db1010fb945c5ad3d5))
+*   add `into_inner` and `Error` impl to `Full` (#43) ([527a6398](https://github.com/hawkw/thingbuf/commit/527a6398eafcc23bd23bea6bd9dc29788a605789))
+*   add `Deref` and `DerefMut` impls to `Ref` types (#13) ([6ebfe7b8](https://github.com/hawkw/thingbuf/commit/6ebfe7b8fd4641cdb72566a51a1e99f737888283), breaks [#](https://github.com/hawkw/thingbuf/issues/))
+*   add nicer `fmt::Debug` impls (#4) ([38cbad20](https://github.com/hawkw/thingbuf/commit/38cbad20265c4ec3fd6b9bd715a1e6e36a03e72e))
+* **StringBuf:**  add `StringBuf`  type ([856c1f6c](https://github.com/hawkw/thingbuf/commit/856c1f6c93f53ad3566e76b6edc33217c451791b))
+* **ThingBuf:**  add `pop_with` and `push_with` ([9192c603](https://github.com/hawkw/thingbuf/commit/9192c603855e0099310a8228afa9b9475df5930b))
+* **mpsc:**
+  *  stick errors in their own module ([3137b85e](https://github.com/hawkw/thingbuf/commit/3137b85e0dbfe9716d29b45efc41443046e726bd))
+  *  add `std::error::Error` impls ([d5ac083b](https://github.com/hawkw/thingbuf/commit/d5ac083b15ef70d7d51e74ad1eaa3ca534e8a153))
+  *  add methods to errors ([d5bf3db0](https://github.com/hawkw/thingbuf/commit/d5bf3db00606e3118e9d6ba21de03d784024f893))
+  *  add support for statically-allocated MPSC channels (#23) ([5b17c184](https://github.com/hawkw/thingbuf/commit/5b17c184b0cf4ed4b1a5de3b4ce5bac13b75ff2f), closes [#17](https://github.com/hawkw/thingbuf/issues/17))
+  *  add waiting `send`/`send_ref` (#7) ([76df064c](https://github.com/hawkw/thingbuf/commit/76df064cbfb7b18aea9ec3a7b768f0528840be21))
+  *  make errors more like other mpscs (#5) ([5e749ccc](https://github.com/hawkw/thingbuf/commit/5e749ccc91140063d9287dccd36312f110c42836))
+  *  initial sync and async channel APIs (#2) ([1c28c84f](https://github.com/hawkw/thingbuf/commit/1c28c84fdc9ffb895799b51fd82beb33783f7b6a))
+* **recycling:**  add customizable recycling policies (#33) ([54e53534](https://github.com/hawkw/thingbuf/commit/54e53534303606d734cb7490cf782d7b71fb8103), closes [#30](https://github.com/hawkw/thingbuf/issues/30))
+* **thingbuf:**
+  *  add `no_std` compatible `StaticThingBuf` (#1) ([3b23f858](https://github.com/hawkw/thingbuf/commit/3b23f8583b3f9c91d2f883f26b0ff454fabe00cf))
+  *  hahahaha static storage works ([e47cd7dc](https://github.com/hawkw/thingbuf/commit/e47cd7dc80990ec4aadabe5aab229d4195254f6e))
+
+#### Breaking Changes
+
+*   add `Deref` and `DerefMut` impls to `Ref` types (#13) ([6ebfe7b8](https://github.com/hawkw/thingbuf/commit/6ebfe7b8fd4641cdb72566a51a1e99f737888283), breaks [#](https://github.com/hawkw/thingbuf/issues/))
+
+#### Bug Fixes
+
+* **ThingBuf:**
+  *  fix backwards subtraction in `len` ([caab6b23](https://github.com/hawkw/thingbuf/commit/caab6b23540ad344e87b7a1a6bcda41d6be7eb7f))
+  *  fix wrong increment in pop ([0e53279c](https://github.com/hawkw/thingbuf/commit/0e53279cc25774fef5f5eab34d6ab42807b2dde5))
+* **mpsc:**
+  *  ensure un-received messages are dropped (#29) ([c444e50b](https://github.com/hawkw/thingbuf/commit/c444e50b8d2ca98745ae451100a4b01f84d054d5))
+  *  fix a deadlock in async send_ref  (#20) ([c58c6200](https://github.com/hawkw/thingbuf/commit/c58c620096a063e275f9c16e0a89da3399b47877))
+
+
+

+ 10 - 3
Cargo.toml

@@ -9,8 +9,15 @@ name = "thingbuf"
 version = "0.1.0"
 edition = "2021"
 rust-version = "1.57.0"
-
-# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
+author = "Eliza Weisman <eliza@buoyant.io>"
+repository = "https://github.com/hawkw/thingbuf"
+homepage = "https://github.com/hawkw/thingbuf"
+description = """
+I'm at the buffer pool. I'm at the MPSC channel. I'm at the combination MPSC channel and buffer pool.
+"""
+keywords = ["lock-free", "queue", "channel", "mpsc", "pool"]
+categories = ["asynchronous", "concurrency", "data-structures", "no-std"]
+exclude = ["/.github", "/.cargo", "/bin", "/bench", "/assets"]
 
 [features]
 std = ["alloc", "parking_lot"]
@@ -20,7 +27,7 @@ static = []
 
 [dependencies]
 pin-project = "1"
-parking_lot = { version = "0.11", optional = true, default-features = false }
+parking_lot = { version = "0.12", optional = true, default-features = false }
 
 [dev-dependencies]
 tokio = { version = "1.14.0", features = ["rt", "rt-multi-thread", "macros", "sync"] }

+ 23 - 0
README.md

@@ -3,6 +3,29 @@
 > "I'm at the buffer pool. I'm at the MPSC channel. I'm at the combination MPSC
 > channel and buffer pool."
 
+[![crates.io][crates-badge]][crates-url]
+[![Documentation][docs-badge]][docs-url]
+[![Documentation (HEAD)][docs-main-badge]][docs-main-url]
+[![MIT licensed][mit-badge]][mit-url]
+[![Test Status][tests-badge]][tests-url]
+[![Loom Models][loom-badge]][loom-url]
+[![Sponsor @hawkw on GitHub Sponsors][sponsor-badge]][sponsor-url]
+
+[crates-badge]: https://img.shields.io/crates/v/thingbuf.svg
+[crates-url]: https://crates.io/crates/thingbuf
+[docs-badge]: https://docs.rs/thingbuf/badge.svg
+[docs-url]: https://docs.rs/thingbuf
+[docs-main-badge]: https://img.shields.io/netlify/f2cde148-79c2-4e3f-ab2b-285dff1b9fdf?label=docs%20%28main%20branch%29
+[docs-main-url]: https://thingbuf.elizas.website
+[mit-badge]: https://img.shields.io/badge/license-MIT-blue.svg
+[mit-url]: ../LICENSE
+[tests-badge]: https://github.com/hawkw/thingbuf/actions/workflows/tests.yml/badge.svg?branch=main
+[tests-url]: https://github.com/hawkw/thingbuf/actions/workflows/tests.yml
+[loom-badge]: https://github.com/hawkw/thingbuf/actions/workflows/loom.yml/badge.svg?branch=main
+[loom-url]: https://github.com/hawkw/thingbuf/actions/workflows/loom.yml
+[sponsor-badge]: https://img.shields.io/badge/sponsor-%F0%9F%A4%8D-ff69b4
+[sponsor-url]: https://github.com/sponsors/hawkw
+
 ## What Is It?
 
 `thingbuf` is a lock-free array-based concurrent ring buffer that allows access

+ 1 - 3
bench/Cargo.toml

@@ -7,15 +7,13 @@ publish = false
 # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
 
 [features]
-default = ["parking_lot"]
+default = []
 # These feature flags can be disabled if we don't want to run comparison
 # benchmarks, such as when just comparing two `thingbuf` versions.
 comparisons = ["crossbeam", "async-std", "futures", "tokio-sync", "std-sync"]
 tokio-sync = ["tokio/sync"]
 std-sync = []
 
-# Use parking_lot mutexes in `thingbuf` 
-parking_lot = ["thingbuf/parking_lot"]
 
 [dependencies]
 thingbuf = { path = ".." }