Skip to content
@hylic-recursion

Hylic

Parallel recursion: define graphs and folds, and just run it in parallel.

hylic-recursion

hylic is a Rust library for catamorphic computation over trees and DAGs. The recursion does four things at each node: init builds a per-node heap, visit yields each child, each child's result is recursively computed and accumulated into the heap, then finalize closes the heap into the node's result. The library packages that pattern as three independent values (a Fold<N, H, R>, a Treeish<N>, and an executor that drives the recursion) and ships sequential and parallel executors that consume them through a uniform executor.run(&fold, &graph, &root) interface.

The parallel executor is Funnel, a work-stealing engine bundled in the core crate. Each policy preset is a triple of static types (queue topology × accumulation strategy × wake policy), all generic parameters on Funnel<P>, so picking a preset compiles a different specialisation of the entire walk; there is no runtime dispatch on strategy. Continuations are defunctionalised and live in arenas released at end of pool lifetime. On the published 14-workload Matrix benchmark, a Funnel variant wins ten rows outright against a handrolled Rayon recursion and a scoped pool, and lands within a few percent of the winner on the rest.

hylic-pipeline is a typestate pipeline builder over the same primitives. The same (grow?, graph, fold, lifts...) is constructed by chaining methods (.filter_seeds(...).wrap_init(...).zipmap(...).run(...)), with the chain's stage and shape enforced at the type level. Both surfaces share the same fold/treeish/executor decomposition; the difference is in how the chain is built.

The long-form material lives at https://hylic-recursion.github.io/hylic-docs: a quick start, the recursive pattern, the Funnel deep-dive, the interactive benchmark viewer, and a cookbook of worked examples (filesystem summary, expression evaluation, module resolution, configuration inheritance, cycle detection, parallel execution).

The repositories that ship the code:

Popular repositories Loading

  1. hylic hylic Public

    Composable recursive tree computations; transformable, fluent API and great parallel performance built in.

    Rust 5 1

  2. hylic-pipeline hylic-pipeline Public

    Typestate pipelines and sugar traits over hylic lifts.

    Rust

  3. hylic-benchmark hylic-benchmark Public

    Benchmark suite and comparison executors for hylic.

    Rust

  4. hylic-docs hylic-docs Public

    mdBook source + doc-tested code samples for the hylic documentation site.

    HTML

  5. .github .github Public

Repositories

Showing 5 of 5 repositories

People

This organization has no public members. You must be a member to see who’s a part of this organization.

Top languages

Loading…

Most used topics

Loading…