Expand description

rust support for demes.


This crate provides:

  • Support for reading YAML descriptions of demes models. See loads and load.
  • Support for building a demes model using rust code. See GraphBuilder.

The output of any of these operations is a fully-resolved Graph.

More information

  • See here for an overview of demes.

Technical details

Known limitations

  • There are currently no convenience functions for exporting a Graph back into YAML. However, this task is easily done via serde_yaml::to_string.


An asymmetric migration epoch.
The cloning rate of an Epoch.
A resolved deme.
Deme-level defaults
The size of a Deme at a given Time.
A resolved epoch
Generation time.
A resolved demes Graph.
This type allows building a Graph using code rather then using text input.
Top-level defaults
Top-level metadata
A migration rate.
An ancestry proportion.
A resolved Pulse event
The selfing rate of an Epoch.
Store time values.
A half-open time interval [present, past).
Top-level defaults for a Deme.
HDM representation of an epoch.
An unresolved migration epoch.
An unresolved Pulse event.


Error type for this crate.
Specify how deme sizes change during an Epoch.
The time units of a graph


Build a Graph from a type implementing Read.
Build a Graph from an in-memory str.
Return the package version given in the Cargo.toml file of this crate.