/ruststream:ruststream-corefrom ruststream
Guides contributors to the RustStream core workspace: adding public items, errors, features, doctests, compile-fail snapshots, conformance suites, and managing pull requests. Covers layering, visibility, and no_std rules.
Ships in ruststream. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
The core is a workspace of crates under crates/, released in lockstep: ruststream-core (the
contract), ruststream-runtime, ruststream-memory, ruststream-asyncapi,
ruststream-observability, ruststream-testing, ruststream-conformance, ruststream-cli and
the proc-macro crate ruststream-macros. ruststream, at the root, is the facade that re-exports
them under the public paths; services and broker crates depend on it alone. The core 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.
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))
}
}
ruststream-core on no other
crate of the family; the compiler holds this. ruststream-core is #![no_std]: it names
core and alloc paths, and an item that needs the standard library sits behind its std
feature. The macros emit standard names through ruststream::__private, and the #![no_std]
crate ruststream-no-std-probe fails to build when they name std again. A new public item is re-exported by the facade at
its public path. A module overview lives in the facade, and a doc link that leaves its crate
points at the facade's page on docs.rs. A doc example imports the facade.pub(crate); pub is what the crate root re-exports. An item another
crate of the workspace needs and a service does not is #[doc(hidden)] pub. 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.thiserror in the library (anyhow only in bins and examples), public error enums
#[non_exhaustive], no panics on user or network input.Default. Settlement is honest: every settling site accepts
AckError::Unsupported.async fn in traits (RPITIT), + Send on the returned future, no forced object
safety; erasure lives in runtime. Destructors never panic or block.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.dyn call, extra atomic or copy per message on the delivery and
publish paths. A change there cites just bench --baseline=main.conformance in the same pull request, exercised the way a service reaches it.#[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.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.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 just doc), 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.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub powersemmi/ruststream --plugin ruststream5 skills in this plugin
/ruststreamUse 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, codecs, batches, workers and threads, routers, middleware, running beside an HTTP server, and the framework's compile errors. Use it whenever the project depends on `ruststream`./ruststream-brokerUse when writing, changing or debugging a RustStream broker crate, the adapter between `ruststream` and a broker client: the connect and shutdown lifecycle, publishers and per-message options, subscriptions and retry copies, batching and other capabilities, the crate prelude, the in-process testing mode and the conformance suites. Not for services that use an existing broker crate./ruststream-testingUse when writing, fixing or reviewing tests of a service built on RustStream: asserting what a handler received, how it settled and what it published, retries and delays without waiting, swapping state for a test double, testing without a running broker or against one. Use it instead of mocking broker traits or sleeping./ruststream-without-macrosUse 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.Other plugins' skills for the same job