We manually copy the source files from the current stable release.
We cannot use submodules because the tskit
repository contains symbolic links, which causes problems with bindgen
.
- Don't reinvent the wheel.
If there is a
C
function in place, call it. Calling existing functions takes advantage of the high test coverage oftskit
. - Prefer rust idioms where possible.
For example, provide iterator types instead of manual
next/advance
functions. See howNodeIterator
works by looking insrc/traits.rs
andsrc/trees.ts
for an example of a reusable iterator pattern.