Skip to content
Skills Library
Programming · Building & coding

ruststream-core

/ruststream-core

Use when changing the RustStream core repository itself (powersemmi/ruststream: `src/`, `crates/ruststream-macros`, `tests/`, `examples/`, the site), as a contributor: public items, errors, features, doctests, compile-fail snapshots, conformance suites, the local gates and the pull request.

Repository
ruststream ↗
Licence
Apache-2.0
Last repository change
26.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
2
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 26.10.2026, without references to retired models or APIs.

Licence

Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.

What it does and when to use it

Use when changing the RustStream core repository itself (powersemmi/ruststream: `src/`, `crates/ruststream-macros`, `tests/`, `examples/`, the site), as a contributor: public items, errors, features, doctests, compile-fail snapshots, conformance suites, the local gates and the pull request.

Original author description

Use when changing the RustStream core repository itself (powersemmi/ruststream: `src/`, `crates/ruststream-macros`, `tests/`, `examples/`, the site), as a contributor: public items, errors, features, doctests, compile-fail snapshots, conformance suites, the local gates and the pull request.

How it works

  1. A public item, the way the crate writes it
  2. Rules
  3. Before review
Original SKILL.md headings · 93 lines, 668 words
SKILL.md preview
---
name: ruststream-core
description: "Use when changing the RustStream core repository itself (powersemmi/ruststream: `src/`, `crates/ruststream-macros`, `tests/`, `examples/`, the site), as a contributor: public items, errors, features, doctests, compile-fail snapshots, conformance suites, the local gates and the pull request."
---

# Contributing to the RustStream core

The core is one published crate, `ruststream`, plus the proc-macro crate
`crates/ruststream-macros`, released in lockstep. It is broker-agnostic, 100% safe Rust
(`#![forbid(unsafe_code)]`), and its surface sits behind strictly additive cargo features. The
environment, the gates and the pull request flow are in `CONTRIBUTING.md`; read it first.

## A public item, the way the crate writes it

```rust
use thiserror::Error;

/// Why a string was refused as a subject.
#[derive(Debug, Clone, PartialEq, Eq, Error)]
#[non_exhaustive]
pub enum SubjectError {
    /// The subject is empty.
    #[error("a subject must not be empty")]
    Empty,
}

impl Subject {
    /// Builds a subject, refusing an empty one.
    ///
    /// # Errors
    ///
    /// Returns [`SubjectError::Empty`] for an empty string.
    ///
    /// # Examples
    ///
    /// ```
    /// # #[cfg(all(feature = "macros", feature = "memory", feature = "json"))]
    /// # mod demo {
    /// // A full example in the service's own syntax: the item where a service uses it.
    /// # }
    /// # fn main() {}
    /// ```
    pub fn try_new(subject: impl Into<String>) -> Result<Self, SubjectError> {
        let subject = subject.into();
        if subject.is_empty() {
            return Err(SubjectError::Empty);
        }
        Ok(Self(subject))
    }
}
```

## Rules

- **Visibility.** Default to `pub(crate)`; `pub` is what `lib.rs` re-exports. The crate denies
  `missing_docs`: every public item has a one-line summary, and every one outside `#[doc(hidden)]`
  a compiling `# Examples` doctest that shows the item used where a caller uses it (a handler, a
  mount chain, a broker author's impl), with `?` rather than `unwrap()`. A fallible function has
  `# Errors`, a panicking one `# Panics`.
- **Errors.** `thiserror` in the library (`anyhow` only in bins and examples), public error enums
  `#[non_exhaustive]`, no panics on user or network input.
- **Broker-agnostic.** No broker client and no broker-specific default in the core. A field with no
  sane default gets no `Default`. Settlement is honest: every settling site accepts
  `AckError::Unsupported`.
- **Async.** Native `async fn` in traits (RPITIT), `+ Send` on the returned future, no forced object
  safety; erasure lives in `runtime`. Destructors never panic or block.
- **Compile-time first.** A misuse is rejected by the compiler where the design allows: an enum
  instead of sibling `bool` / `Option` fields, a newtype or `NonZero*` instead of adjacent
  same-typed parameters, a consuming `self` transition or a phase type instead of a "call X before
  Y" rule. Bounds users hit carry `#[diagnostic::on_unimplemented]`. A runtime check stays only
  where the force is external, with a comment naming it.
- **Zero cost.** No allocation, `dyn` call, extra atomic or copy per message on the delivery and
  publish paths. A change there cites `just bench --baseline=main`.
- **A broker-facing rule is a conformance check.** A behaviour a broker must follow ships with its
  check in `conformance` in the same pull request, exercised the way a service reaches it.
- **Tests.** Unit tests in the module's own `#[cfg(test)] mod tests`; public API tests in `tests/`
  through the `TestApp` harness; no mocks; no `sleep` for synchronization. Compile-fail snapshots
  change only after reading the diff.
- **Docs move with the code.** Rustdoc says what an item is; a component page on the site says how
  a topic is done, with a Macros and a Manual tab of compiled regions from `examples/`; the agent
  skills in `.agents/skills/` and the rules in `context7.json` name the recommended path. A page
  in Guides or Architecture changes in English, Russian and Chinese together.
- **Text.** English only in files, no emoji, no em-dashes or en-dashes.

## Before review

```bash
just ci                    # just check (fmt, clippy, feature edges, rustdoc, compile-fail) + just test
just brokers               # when the change touches what broker crates use
```

The site gates run in `website/` (`npm ci && npm run typecheck && npm run test && npm run build`,
after `cargo doc --all-features --no-deps`), with `scripts/lint_doc_fences.py`,
`scripts/check_doc_parity.py` and `scripts/check_doc_i18n.py`. Pre-1.0 a minor bump is breaking
and a patch additive. A pull request opens as a draft and stays one until the maintainer marks it
ready; commits are signed. Releases are the maintainer's.
Files in this package (2)
  • SKILL.md 5 KB
  • agents/openai.yml 1 KB

Versions

The database has no other skills named ruststream-core.

Database snapshot: 13.11.2026 · package version 8513c9ab3c58 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100ruststream
    Use when writing, changing or debugging a service built on the RustStream messaging framework (crates `ruststream` and `ruststream-*` broker crates such as nats, rdkafka, lapin, fred): subscriber handlers, the app, replies and publishing, acks, retries and dead letters, state,…
  • 95ruststream-without-macros
    Use when a RustStream service is built without the `macros` feature, or when code must spell out what `#[subscriber]`, `#[ruststream::app]` and the derives generate: `Handle` impls, `subscriber(..).build()`, a hand-written `main`, manual `Outgoing`, `OutSlot`, `Deserialized` and `Serialized` impls.
  • 100rust-docs
    Doc comments as API contract — a one-line first sentence, module-level docs, Examples, Errors, Panics and Safety sections, doctests that actually run, and intra-doc links. Use when writing or reviewing rustdoc comments, when a public item is undocumented, when doctests are…
  • 100pr-test-case-assistant
    Read public GitHub pull requests, produce a short triage brief, and draft feature test cases grounded in the pull request description and diff. Use when a Slack user provides a public GitHub repository or pull request.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.