Skip to content

Integrate rkt_ws contrib crate as feature into core crate - #21

Open
martynp wants to merge 2 commits into
mainfrom
integrate_ws_contrib
Open

Integrate rkt_ws contrib crate as feature into core crate#21
martynp wants to merge 2 commits into
mainfrom
integrate_ws_contrib

Conversation

@martynp

@martynp martynp commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

AI-Tool: Claude Code, Codex

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR promotes the existing contrib/ws functionality into the core rkt crate as an optional ws feature exposed via rkt::ws, while keeping rkt_ws as a deprecated, source-compatible shim for one minor release cycle. It also bumps the workspace version to 1.3.0 and updates docs/examples/testing to reflect the new integration.

Changes:

  • Add rkt::ws behind the new ws feature in the core crate, backed by tokio-tungstenite.
  • Convert rkt_ws into a deprecated compatibility shim that re-exports rkt::ws.
  • Update documentation, examples, and CI/test scripts for 1.3.0 and the new WebSocket feature path.

Reviewed changes

Copilot reviewed 35 out of 37 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
website/src/pages/index.js Updates website copy to point to rkt::ws and bumps displayed version.
website/docs/index.md Bumps guide version reference to 1.3.0.
website/docs/14-faq.md Updates FAQ WebSocket guidance to rkt::ws and notes shim deprecation.
website/docs/12-pastebin.md Bumps version in guide snippet to 1.3.0.
website/docs/10-configuration.md Bumps dependency snippets to 1.3.0.
website/docs/06-responses.md Migrates WebSocket docs/examples from rkt_ws to rkt::ws.
website/docs/04-requests.md Bumps feature-enable examples to 1.3.0.
website/docs/02-getting-started.md Bumps getting-started dependency snippet to 1.3.0.
scripts/test.sh Adds ws to core feature test matrix; adjusts shim testing strategy.
release.toml Updates release command example formatting/parameters.
README.md Removes rkt_ws crate listing; documents WebSockets as rkt::ws + ws feature; bumps version.
examples/upgrade/src/main.rs Switches example to use rkt::ws module import.
examples/upgrade/Cargo.toml Enables rkt’s ws feature and removes explicit rkt_ws dependency.
examples/README.md Updates description of the upgrade example to reference rkt::ws.
docs/tests/Cargo.toml Enables ws feature for docs tests; removes dev-dependency on contrib rkt_ws.
core/lib/src/ws/websocket.rs Adjusts imports/paths for in-core ws module integration.
core/lib/src/ws/mod.rs Adds new rkt::ws module API + Stream! macro and documentation.
core/lib/src/ws/duplex.rs Updates module-internal paths to match new core/lib/src/ws/* layout.
core/lib/src/server.rs Minor formatting change (single-line expression).
core/lib/src/serde/uuid.rs Bumps embedded doc snippet to 1.3.0.
core/lib/src/serde/msgpack.rs Bumps embedded doc snippet to 1.3.0.
core/lib/src/serde/json.rs Bumps embedded doc snippet to 1.3.0.
core/lib/src/response/redirect.rs Fixes doc comment indentation.
core/lib/src/request/request.rs Minor formatting (closure inlining).
core/lib/src/listener/quic.rs Bumps embedded doc snippet to 1.3.0.
core/lib/src/listener/proxy.rs Formatting-only changes for readability in proxy protocol code/tests.
core/lib/src/lib.rs Adds ws feature row to docs and gates new pub mod ws behind feature = "ws".
core/lib/src/form/form.rs Fixes doc comment indentation.
core/lib/Cargo.toml Adds ws feature + optional tokio-tungstenite dependency; updates release replacements.
core/codegen/src/lib.rs Bumps embedded doc snippet to 1.3.0.
contrib/ws/tests/legacy.rs Adds a compatibility test ensuring legacy rkt_ws imports/macros still work.
contrib/ws/src/lib.rs Replaces implementation with deprecated type re-exports to rkt::ws.
contrib/ws/README.md Rewrites README as deprecation notice + migration instructions to rkt::ws.
contrib/ws/Cargo.toml Reworks crate to depend on rkt with ws feature; makes tungstenite feature a no-op alias.
contrib/dyn_templates/README.md Bumps documented version to 1.3.0.
CHANGELOG.md Notes new built-in WebSocket support and shim deprecation policy.
Cargo.toml Bumps workspace/package versions and workspace dependency versions to 1.3.0.
Suppressed comments (1)

core/lib/src/ws/mod.rs:314

  • Stream! macro hard-codes rkt::async_stream::try_stream!, which breaks if the rkt dependency is renamed in Cargo.toml. Use $crate::async_stream so the macro is robust to crate renaming.
        ws.stream(move |$channel| rkt::async_stream::try_stream! {
            $($token)*
        })

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread core/lib/src/ws/mod.rs
macro_rules! Stream {
() => ($crate::ws::Stream!['static]);
($l:lifetime) => (
$crate::ws::stream::MessageStream<$l, impl rkt::futures::Stream<
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants