Hypershell v0.2.0
This page lists what Hypershell v0.2.0 changed. Hypershell is a domain-specific language for
shell-script-like programs, built with Context-Generic Programming (CGP), a Rust library
whose macros generate traits and their wiring, and this release moves it from cgp 0.4.1 onto
cgp v0.8.0.
Released on 2026-11-18.
- Crate:
hypershell0.2.0 on crates.io - Compare: v0.1.0...v0.2.0
Summary
The language is assembled from HypershellNamespace, which a context joins with one line, in place
of the cgp_preset! presets that cgp 0.8.0 removed, and its handlers dispatch on their input type
through path keys. The release fixes buffered HTTP bodies that did not follow redirects, steps that
v0.1.0 left unwired or wired without the promotion they need, and failures that were lost or
panicked. Every published crate now has a README that is also its crate documentation.
Compatibility
- Minimum Rust version: 1.90, where v0.1.0 needed 1.87. The library and a small program build on stable Rust; the repository pins a nightly with the next-generation trait solver for its largest examples.
- CGP version: built on
cgp0.8.0, released beside it, where v0.1.0 usedcgp0.4.1. A program's crate depends oncgpitself, because thehypershell!expansion names it. - Crates:
hypershell,hypershell-components,hypershell-tokio-components,hypershell-reqwest-components,hypershell-json-components,hypershell-hash-components,hypershell-tungstenite-components, andhypershell-macro, all at 0.2.0.
Upgrading
- Move the project from
cgp0.4.1 to 0.8.0, following theUpgradingsections of the v0.5.0, v0.6.0, v0.7.0, and v0.8.0 notes, and depend oncgpdirectly; see Thecgprequirement is 0.8.0. - Replace each custom context's
#[cgp_context(MyAppComponents: HypershellPreset)]with adelegate_components!block holdingnamespace HypershellNamespace;; see Presets are replaced byHypershellNamespace. - Replace each preset that added syntax with a
cgp_namespace!that inheritsHypershellNamespaceand keys the new syntax's handlers under@cgp.extra.handler.HandlerComponent, and join that namespace instead; see Handlers dispatch on paths. - Change every Hypershell crate's requirement to
0.2.0.
Breaking changes
The cgp requirement is 0.8.0
Every Hypershell crate requires cgp 0.8.0 where v0.1.0 required 0.4.1, so a project moves across
the breaking changes of cgp v0.5.0 to v0.8.0 with this release. Introduced in
#5.
Presets are replaced by HypershellNamespace
The presets modules of hypershell and the five component crates that had one are gone, with
HypershellPreset and its re-export from hypershell::prelude. hypershell::namespaces exports
HypershellNamespace, a namespace inheriting CGP's DefaultNamespace that wires the whole
language, and each component crate other than hypershell-hash-components exports an aggregate
provider of its handlers, such as HypershellTokioProvider. HypershellCli and HypershellHttp
join the namespace, and a custom context does the same with namespace HypershellNamespace; in its
delegate_components! block. See
the assembly page. Introduced in
#5.
Handlers dispatch on paths
A handler is keyed by a path under @cgp.extra.handler.HandlerComponent, with one segment for the
syntax type and, where a step accepts several inputs, one for the input type, in place of the
UseDelegate and UseInputDelegate tables of v0.1.0. An extension registers its syntax in a
namespace that inherits HypershellNamespace, as the http_checksum_native example does for
Checksum and BytesToHex. See
streams and input dispatch.
Introduced in #5.
New features
hypershell::preludeexports the handler traits and their keys, such asHandler,HandlerComponent, andComputer, whichcgp0.8.0's prelude no longer carries. Introduced in #5.BoxHandler<InHandler>, inhypershell-components, runs a handler with its future boxed, erasing the future's type. Introduced in #1.- New examples:
compare_and_branchandparallel_compare, which addCompareandIfsyntax in the unpublished examples crate.
Improvements
- Crate documentation: each published crate's README is its crate documentation, so docs.rs and
crates.io show the same page, and
hypershell's runs thehelloprogram as a doc test. Introduced in #5. - Package metadata: each crate's
repositorynames the Hypershell repository, where v0.1.0 namedcgp's; each crate has a description of its own, ahomepage, keywords, and categories; and each package includes the license file. Introduced in #5.
Fixes
- A streaming HTTP request with a
Vec<u8>orStringbody is sent buffered, soreqwestfollows a redirect; a streamed body still does not. Introduced in #5. PutMethodandDeleteMethodare wired for HTTP requests, where no v0.1.0 preset wired either. Introduced in #5.ConvertTois wired with the promotion from its synchronous handler to an async one, which v0.1.0's wiring lacked. Introduced in #5.- A streamed command that exits with a failure ends its output with an
io::Errorcarrying aChildExitError, with the exit code and stderr; v0.1.0 never waited for the child, so its stream ended as though the command had succeeded. Introduced in #5. - A failed WebSocket connection is raised as an error, where v0.1.0 panicked. Introduced in #5.
An AI agent wrote this page from the release's source changes and the CGP knowledge base. Its content was verified against the project's source at the release's tag. See How AI is used in this project.