Skip to main content

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.

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 cgp 0.8.0, released beside it, where v0.1.0 used cgp 0.4.1. A program's crate depends on cgp itself, because the hypershell! expansion names it.
  • Crates: hypershell, hypershell-components, hypershell-tokio-components, hypershell-reqwest-components, hypershell-json-components, hypershell-hash-components, hypershell-tungstenite-components, and hypershell-macro, all at 0.2.0.

Upgrading​

  1. Move the project from cgp 0.4.1 to 0.8.0, following the Upgrading sections of the v0.5.0, v0.6.0, v0.7.0, and v0.8.0 notes, and depend on cgp directly; see The cgp requirement is 0.8.0.
  2. Replace each custom context's #[cgp_context(MyAppComponents: HypershellPreset)] with a delegate_components! block holding namespace HypershellNamespace;; see Presets are replaced by HypershellNamespace.
  3. Replace each preset that added syntax with a cgp_namespace! that inherits HypershellNamespace and keys the new syntax's handlers under @cgp.extra.handler.HandlerComponent, and join that namespace instead; see Handlers dispatch on paths.
  4. 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::prelude exports the handler traits and their keys, such as Handler, HandlerComponent, and Computer, which cgp 0.8.0's prelude no longer carries. Introduced in #5.
  • BoxHandler<InHandler>, in hypershell-components, runs a handler with its future boxed, erasing the future's type. Introduced in #1.
  • New examples: compare_and_branch and parallel_compare, which add Compare and If syntax 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 the hello program as a doc test. Introduced in #5.
  • Package metadata: each crate's repository names the Hypershell repository, where v0.1.0 named cgp's; each crate has a description of its own, a homepage, keywords, and categories; and each package includes the license file. Introduced in #5.

Fixes​

  • A streaming HTTP request with a Vec<u8> or String body is sent buffered, so reqwest follows a redirect; a streamed body still does not. Introduced in #5.
  • PutMethod and DeleteMethod are wired for HTTP requests, where no v0.1.0 preset wired either. Introduced in #5.
  • ConvertTo is 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::Error carrying a ChildExitError, 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.