16 releases

0.4.3 Sep 20, 2024
0.4.2 Mar 31, 2024
0.3.8 Dec 17, 2023
0.3.6 Nov 28, 2023
0.1.0 Apr 30, 2023

#27 in Rendering

Download history 5/week @ 2024-08-23 11/week @ 2024-08-30 259/week @ 2024-09-20 23/week @ 2024-09-27 10/week @ 2024-10-04 8/week @ 2024-10-11 3/week @ 2024-10-18 1/week @ 2024-10-25 7/week @ 2024-11-01 3/week @ 2024-11-08 5/week @ 2024-11-15 23/week @ 2024-11-22 30/week @ 2024-11-29 30/week @ 2024-12-06

88 downloads per month
Used in 2 crates

MIT/Apache

78KB
1.5K SLoC

moongraph 🌙📈

moongraph is a Rust library for scheduling, managing resources, and running directed acyclic graphs.

In moongraph, graph nodes are normal Rust functions and graph edges are function parameters and function results.

The graph is built automatically by registering each function. moongraph figures out how the functions connect by their parameters and their results.

moongraph validates and schedules nodes to run in parallel where possible, using rayon as the underlying parallelizing tech. This only happens when compiled with the "parallel" feature, on by default.

what

moongraph is made up of two parts:

  • The scheduler - provided by dagga
  • The resource manager - provided by broomdog

why

Scheduling and running DAGs is a common problem and I didn't find any prior art.

how

Read the introduction tutorial

uses

moongraph is in use in a number of other libraries (let me know if you use it in yours, and how :))

  • As the render graph in renderling, a scrappy real-time renderer with advanced lighting
  • Its scheduler is used for scheduling systems in apecs, a well-performing ECS with async integration.

💚 Sponsor this!

This work will always be free and open source. If you use it (outright or for inspiration), please consider donating.

💰 Sponsor 💝

License

Renderling is free and open source. All code in this repository is dual-licensed under either:

MIT License (LICENSE-MIT or http://opensource.org/licenses/MIT)
Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)

at your option. This means you can select the license you prefer! This dual-licensing approach is the de-facto standard in the Rust ecosystem and there are very good reasons to include both.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies

~0.5–1.6MB
~36K SLoC