Currently, if you want a reference to be citable, you must have already added it via set_references. This is not ideal e.g. for Zotero, where there may be thousands of references, and serializing all of them to JSON once at startup, and keeping the processor updated each time one of them changes (ser the single changed ref), is too much. It probably needs to emulate citeproc-js' sys API here, where you call into JS when a reference is not found.
The following PR over at salsa may help avoid calling this for every cite, every time -- Zotero would simply notify citeproc-rs that it should invalidate one of its references, and maybe get a callback later if that item is cited.
This is unnecessary. Clients can simply keep track of which references are being used in a document (which they know, having passed in all the clusters), and subscribe to only those.
Currently, if you want a reference to be citable, you must have already added it via
set_references
. This is not ideal e.g. for Zotero, where there may be thousands of references, and serializing all of them to JSON once at startup, and keeping the processor updated each time one of them changes (ser the single changed ref), is too much. It probably needs to emulateciteproc-js
'sys
API here, where you call into JS when a reference is not found.The following PR over at salsa may help avoid calling this for every cite, every time -- Zotero would simply notify citeproc-rs that it should invalidate one of its references, and maybe get a callback later if that item is cited.
https://github.com/salsa-rs/salsa/pull/194/files#diff-08c6e038e5b8a9cfe78f8df09fd08dc1