惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

云风的 BLOG
云风的 BLOG
Blog — PlanetScale
Blog — PlanetScale
博客园 - 【当耐特】
博客园_首页
The GitHub Blog
The GitHub Blog
月光博客
月光博客
Hugging Face - Blog
Hugging Face - Blog
有赞技术团队
有赞技术团队
博客园 - 三生石上(FineUI控件)
D
Docker
Stack Overflow Blog
Stack Overflow Blog
WordPress大学
WordPress大学
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Apple Machine Learning Research
Apple Machine Learning Research
Vercel News
Vercel News
酷 壳 – CoolShell
酷 壳 – CoolShell
雷峰网
雷峰网
小众软件
小众软件
I
InfoQ
A
About on SuperTechFans
T
The Blog of Author Tim Ferriss
S
SegmentFault 最新的问题
Microsoft Azure Blog
Microsoft Azure Blog
博客园 - Franky

Hacker News: Show HN

PurrrrrFocus: Pomodoro Timer App - App Store Workflow Engine — Multi-Step Orchestration for Bun RapidPhoto: Pro Photo Editor App - App Store GitHub - DheerG/swarms: Achieve extraordinary results with claude code across a variety of tasks SPICE simulation → oscilloscope → verification with Claude Code — Lucas Gerads Show HN: VCoding – A 5 MB native Windows IDE with no dynamic dependencies Show HN: LLMs don't hallucinate because they're bad at math, it's the format GitHub - Agent-FM/agentfm-core: AgentFM is a peer-to-peer network that turns everyday computers into a decentralized AI supercomputer. AgentFM lets you run massive AI workloads directly across a global mesh of idle CPUs and GPUs. Show HN: Tracking Top US Science Olympiad Alumni over Last 25 Years GitHub - Potarix/agent-hub: One place to talk to all your agents Show HN: Runtime security for AI agents(injection,tool abuse, data exfiltration) GitHub - dubeyKartikay/lazyspotify: Terminal Spotify client for macOS and Linux GitHub - the-banana-tool/king-louie: Easy to use GUI Personal AI Assistant. Win/Linux/Mac. Show HN I made my vacation rental bookable by AI agents–no Airbnb, 0% commission GitHub - basteez/jsf-autoreload: maven plugin to enable hot reload on jsf projects uvm32/hosts/host-gdbstub at main · ringtailsoftware/uvm32 GitHub - labsai/EDDI: Config-driven engine that turns JSON into production-grade AI agents. Multi-agent orchestration, 12+ LLM providers, MCP/A2A protocols, RAG, persistent memory, and enterprise compliance (EU AI Act, GDPR, HIPAA). Built on Quarkus. GitHub - glitchnsec/fortyone-oss: AI Executive Assistant Platform Quickstart | Alien GitHub - muxshed/shed: One stream in, or many. Every destination, simultaneously. No cloud middleman, no per-channel fees, no limits. GitHub - ocrbase-hq/ocrbase: 📄 PDF/IMG ->.MD/JSON Document OCR API for PaddleOCR and GLMOCR. Self-hostable. GitHub - impactjo/home-memory: MCP server that lets your AI assistant remember everything about your home. GitHub - Sets88/dbcls: DbCls is a powerful terminal database client that supports various databases GitHub - neptun2000/heor-agent-mcp GitHub - SeanFDZ/macmind: Single-layer transformer in HyperTalk for the classic Macintosh RollQuation: Math Puzzles - Apps on Google Play GitHub - dropbox/witchcraft Show HN: Agent-cache – Multi-tier LLM/tool/session caching for Valkey and Redis GitHub - opentalon/opentalon: OpenTalon is an open-source platform built from the ground up in Go as a robust alternative to OpenClaw LinkedIn™ 职位抓取工具 - Chrome 应用商店
GitHub - ValeriaVG/jigs: Functional request -> response p...
valeriavg_de · 2026-04-27 · via Hacker News: Show HN

⚠️ Very early stage. This project is in active, exploratory development and is nowhere close to being production ready. APIs will change, things will break, and entire ideas may be thrown out. Star it, watch it, play with it — but don't ship it.

A jig is a custom-made tool that controls the location or motion of other tools.

HTTP handlers, RPC services, agentic workflows, data pipelines and even event listeners all have the same shape: something comes in and, after several steps, something comes out.

And the more steps there are in this process, the harder it becomes to debug, fix and maintain the code that does it.

So jigs is a small Rust framework that lets you be explicit about your processing steps and write your code like this:

#[jig]
fn handle(request: Request) -> Response {
    request
        .then(log_incoming)
        .then(set_auth_state)
        .then(route_to_feature)
        .then(log_response)
}

Every step is a jig too, so you can compose processing pipelines of virtually any size.

The main advantage, though, is that jigs generates a graph of your codebase at compile time and lets you navigate it with ease.

Pipeline map

Install

cargo add jigs

To enable per-step tracing, turn on the trace feature:

cargo add jigs --features trace

Quickstart

use jigs::{jig, Request, Response};

#[jig]
fn validate(r: Request<u32>) -> Request<u32> { r }

#[jig]
fn handle(r: Request<u32>) -> Response<String> {
    Response::ok(format!("got {}", r.0))
}

fn main() {
    let response = Request(42u32).then(validate).then(handle);
    assert_eq!(response.inner.unwrap(), "got 42");
}

There are four kinds of jigs, distinguished by their input and output types:

Input Output Purpose
Request Request enrich, validate, transform
Request Response terminal handler
Response Response post-process the outgoing message
Request Branch<Req,Resp> guard that may short-circuit

The type system enforces ordering: once you hold a Response, you cannot chain a jig that expects a Request. Errored responses and Branch::Done short-circuit the rest of the pipeline.

See examples/ for sync, async, and HTTP usage.

Generate a map

Every #[jig] registers itself in a global inventory at link time, so you can render an interactive HTML map and a Markdown/Mermaid version straight from your code — no scanning, no build script.

use jigs::{jig, Request, Response};

#[jig]
fn validate(r: Request<u32>) -> Request<u32> { r }

#[jig]
fn handle(r: Request<u32>) -> Response<String> {
    Response::ok(format!("got {}", r.0))
}

fn main() -> std::io::Result<()> {
    let dir = env!("CARGO_MANIFEST_DIR");
    std::fs::write(
        format!("{dir}/map.html"),
        jigs::map::to_html(Some("handle"), "my service", None),
    )?;
    std::fs::write(
        format!("{dir}/map.md"),
        jigs::map::to_markdown(Some("handle"), "my service"),
    )?;
    Ok(())
}

The third argument to to_html is an optional editor URL template; pass e.g. Some("vscodium://file/{path}:{line}") for VSCodium, vscode://file/{path}:{line} for VS Code or Cursor, idea://open?file={path}&line={line} for JetBrains IDEs. With None the link falls back to file:// and opens with your OS default.

The Markdown form embeds a Mermaid flowchart that renders inline on GitHub — see examples/http/map.md.

Trace the exact steps in runtime

Things break, and the bigger the system, the harder it is to figure out where exactly things went wrong. jigs lets you pinpoint an error or a bottleneck with ease:

log_incoming     ✓  0.1ms
set_auth_state   ✓  2.3ms
route_to_feature ✗  ERROR 500
  └─ validate_route  ✓  0.4ms
  └─ check_permissions ✗  ERROR: DB Timeout

With the trace feature on, drain the per-thread buffer and render it in either of two formats:

let entries = jigs::trace::take();
print!("{}", jigs::log::render_tree(&entries));   // human-readable
print!("{}", jigs::log::render_ndjson(&entries)); // one JSON object per line

The NDJSON form is meant for automated log ingestion; each line carries name, depth, duration_ns, ok and an optional error message.

Everything agnostic

jigs works with any existing or future framework that has two distinct types for incoming and outbound messages. Check the examples to see it in action.

Roadmap

  • Basic functionality
  • Time tracing (behind the trace feature)
  • Logging utils (tree + NDJSON via jigs-log)
  • Generation of interactive map at compile time (see above)
  • Add more complex examples

Maybe Roadmap

  • Runtime tracing with interactive map
  • Ability to trace and view remote jigs services as one system

License

MIT — see LICENSE.