Skip to main content

Rust library

This document describes the design of the Rust library and of the individual CLI commands, as well as tracks the implementation status. This document is split into the functions for the CLI and the library implementing the CLI.

We use symbols to indicate the status of implementation for the different parts of the interface (see table below). For work that is planned or is in progress, we include in-depth descriptions of the planned implementation. This may include signatures, docstrings, and pseudocode to clarify the design. Once the interface is implemented (done), we will remove the signatures from the documentation and point to the reference documentation instead. The symbols we use are described in the table below.

A table showing the symbols used to indicate the status of interface components, along with their descriptions.
Status Description

Interface that has been implemented.

Interface that is currently being worked on.

Interface that is planned, but isn’t being worked on currently.

The shapes, fill colours, and bolding of the boxes in the diagrams below have specific meanings.

CLI code

All the CLI functions take one argument: args. The type of the args depends on the function name, but their struct type is always the function name with Args as the suffix (e.g. ListArgs). These structs are created when Rust parses the command when it is used on the CLI.

Many functions or methods return a Result type. In those cases, the design diagrams assume that the error will contain the correct message and be send to stderr. So arrows and boxes are not included for errors to simplify the diagrams.

The init CLI command isn’t shown here as it is a very simple command to create an .zenodo.toml file with empty Metadata fields.