Skip to content

v0.2.0

Compare
Choose a tag to compare
@cormacrelf cormacrelf released this 10 Aug 13:00
· 38 commits to master since this release

Checksum: d0df70204a01cf7c1c205aa8b3ebe62ce2e4556cb348d67279b0470652f33320

Add to SPM/XCode via https://github.com/cormacrelf/CiteprocRsKit-Binary

Many changes from v0.1.0-alpha in this release.

  • Much more of the citeproc API is now covered by the FFI layer. You can now manipulate clusters and cites and render a full bibliography. (No batched updates/diffs yet.)
  • Complete rewrite of Swift bindings.
  • All Swift APIs prefixed with CR, shorter than CiteprocRs
  • API entry point is now called CRDriver(style:localeCallback:outputFormat:)
  • All APIs can throw, and all errors thrown are CRError with the sole exception of Swift-side JSON serialization errors.
  • CRError represents an error from Rust with a human-readable error message
  • All panics are caught and exposed to Swift as CRError with err.code == .caughtPanic. Any panic "poisons" the driver, preventing its reuse (as reuse would most likely be unsafe).
  • CRDriver.previewReference(reference:) now gives you a bibliography entry, unlike previewCitationCluster.
  • You can provide a sink for rust-side logging. There is a built-in implementation for the Unified Logging system on iOS. See CRLogger and CRLog. The filter string is passed to https://lib.rs/env_logger as if it were the RUST_LOG environment variable. This is static configuration, and the more modules you allow, the more performance impact logging will have. Setting minSeverity: CRLevelFilter.warn, filter: "" is a good basic default, it will print the warnings and errors from anywhere. For problems with output, try filter: "citeproc_proc::db=debug" to dip the minimum severity for that module only.
  • Patterns implemented for less copying, and fewer allocations when copying, data between Swift and FFI layer