Skip to content

docs(hydro_lang): explain embedded serialization mode in networking docs#3043

Merged
shadaj merged 1 commit into
mainfrom
sandbox-da498c15-aae9-4182-b653-c6ce3211da67
Jul 20, 2026
Merged

docs(hydro_lang): explain embedded serialization mode in networking docs#3043
shadaj merged 1 commit into
mainfrom
sandbox-da498c15-aae9-4182-b653-c6ce3211da67

Conversation

@shadaj

@shadaj shadaj commented Jul 17, 2026

Copy link
Copy Markdown
Member

Confirmed that UDP channels support .embedded() serialization (verified
via a throwaway codegen test: UDP.lossy_delayed_forever().embedded()
generates FnMut(T) sinks / Stream<Item = T> sources just like TCP,
since the embedded backend ignores the transport info during codegen —
the declared transport is a contract the hand-wired transport must uphold).

  • docs/docs/hydro/reference/locations/network-configuration.md: replace
    the "bincode is the only supported backend" claim with a new "Embedded"
    subsection under Serialization, explaining raw-element channels, the
    transport-as-contract semantics (including UDP), the absence of a
    transport Result on the receive side, and backend availability
    (embedded deployments + simulator only; panics on Hydro Deploy/Maelstrom)
  • docs/docs/hydro/reference/deploy/embedded.mdx: update the Networking
    intro to mention both serialization modes, and add an "Embedded
    Serialization" section showing the generated struct signatures for
    .embedded() channels (untagged and tagged), fault-handling ownership,
    and cross-links to the network configuration page

Doc snippets verified via the include_mdtests doctests in hydro_test.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 17, 2026

Copy link
Copy Markdown

Deploying hydro with  Cloudflare Pages  Cloudflare Pages

Latest commit: 961b3ec
Status: ✅  Deploy successful!
Preview URL: https://58f43854.hydroflow.pages.dev
Branch Preview URL: https://sandbox-da498c15-aae9-4182-b.hydroflow.pages.dev

View logs

@shadaj
shadaj marked this pull request as ready for review July 17, 2026 21:52
@shadaj
shadaj requested a review from a team July 17, 2026 21:52
shadaj added a commit that referenced this pull request Jul 17, 2026
Confirmed that UDP channels support `.embedded()` serialization (verified
via a throwaway codegen test: `UDP.lossy_delayed_forever().embedded()`
generates `FnMut(T)` sinks / `Stream<Item = T>` sources just like TCP,
since the embedded backend ignores the transport info during codegen —
the declared transport is a contract the hand-wired transport must uphold).

- `docs/docs/hydro/reference/locations/network-configuration.md`: replace
  the "bincode is the only supported backend" claim with a new "Embedded"
  subsection under Serialization, explaining raw-element channels, the
  transport-as-contract semantics (including UDP), the absence of a
  transport `Result` on the receive side, and backend availability
  (embedded deployments + simulator only; panics on Hydro Deploy/Maelstrom)
- `docs/docs/hydro/reference/deploy/embedded.mdx`: update the Networking
  intro to mention both serialization modes, and add an "Embedded
  Serialization" section showing the generated struct signatures for
  `.embedded()` channels (untagged and tagged), fault-handling ownership,
  and cross-links to the network configuration page

Doc snippets verified via the `include_mdtests` doctests in `hydro_test`.

Co-authored-by: Infinity 🤖 <infinity@hydro.run>
PR: #3043
@shadaj
shadaj force-pushed the sandbox-da498c15-aae9-4182-b653-c6ce3211da67 branch from ce80f97 to 5219915 Compare July 17, 2026 22:13

@akainth015 akainth015 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

One question, but it looks great overall

Comment thread docs/docs/hydro/reference/locations/network-configuration.md Outdated
Comment thread docs/docs/hydro/reference/deploy/embedded.mdx
Comment thread docs/docs/hydro/reference/deploy/embedded.mdx Outdated
Comment thread docs/docs/hydro/reference/locations/network-configuration.md Outdated
Confirmed that UDP channels support `.embedded()` serialization (verified
via a throwaway codegen test: `UDP.lossy_delayed_forever().embedded()`
generates `FnMut(T)` sinks / `Stream<Item = T>` sources just like TCP,
since the embedded backend ignores the transport info during codegen —
the declared transport is a contract the hand-wired transport must uphold).

- `docs/docs/hydro/reference/locations/network-configuration.md`: replace
  the "bincode is the only supported backend" claim with a new "Embedded"
  subsection under Serialization, explaining raw-element channels, the
  transport-as-contract semantics (including UDP), the absence of a
  transport `Result` on the receive side, and backend availability
  (embedded deployments + simulator only; panics on Hydro Deploy/Maelstrom)
- `docs/docs/hydro/reference/deploy/embedded.mdx`: update the Networking
  intro to mention both serialization modes, and add an "Embedded
  Serialization" section showing the generated struct signatures for
  `.embedded()` channels (untagged and tagged), fault-handling ownership,
  and cross-links to the network configuration page

Doc snippets verified via the `include_mdtests` doctests in `hydro_test`.

Co-authored-by: Infinity 🤖 <infinity@hydro.run>
PR: #3043
@shadaj
shadaj force-pushed the sandbox-da498c15-aae9-4182-b653-c6ce3211da67 branch from 5219915 to 961b3ec Compare July 20, 2026 22:29
@shadaj
shadaj enabled auto-merge (squash) July 20, 2026 22:33
@shadaj
shadaj merged commit 4af16e8 into main Jul 20, 2026
20 checks passed
@shadaj
shadaj deleted the sandbox-da498c15-aae9-4182-b653-c6ce3211da67 branch July 20, 2026 22:44
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.

3 participants