Framework

CiteprocRsKit

A wrapper for citeproc-rs in Swift.

Overview

See citeproc-rs for more information.

Topics

Fundamentals

CRDriver is the main set of APIs.

Error handling

Nearly every operation in the entire library is explicitly throws; this means even the smallest error on the FFI boundary results in a stack trace. Notably, every panic that unwinds to the FFI boundary is caught and thrown as a Swift exception, with the backtrace logged to your logger of choice.

Citation clusters

A cluster is a list of cites. Each cite contains a string that should match one of the References known to the Driver. The cluster as a whole is identified with either a string or a UInt32.

Discussion

See also: insertCluster(_:), and other methods on CRDriver.

Document flow

Where in the document are all these clusters?

Logging

CiteprocRsKit is capable of forwarding all of citeproc-rs’ logs to the destination of your choice.

References

To pass reference data into CRDriver, you can use either raw JSON Data or any kind of Encodable value that produces CSL-JSON. For convenience a set of types that do that is provided.