Ken, Robert, and myself had a quick chat about this today.  This is all pretty 
woolly at the moment, but we anticipate a future something like this:

General purpose libraries that we expect to be useful outside of Cyrus should 
be developed as standalone rust projects.  Robert's current VCard work fits 
here.

For code that's not expected to be directly useful outside of Cyrus, it will 
live in a /rust subdirectory of the cyrus-imapd project.  Inside that rust 
subdirectory will be separate crates for each logical piece.  We'll use cargo 
to build those crates into a single static library with C linkage.  The top 
level Makefile.am will arrange for cargo to run, and will link the resulting 
static library into one of the libcyrus libraries.  Cyrus components that need 
to call into the rust code shouldn't need any special extra linkage, because 
they're already linked against libcyrus.

We expect the specifics of this plan to resolve and evolve as we go, since 
we're all pretty new at this.

Robert mentioned this blog post about how Chromium are approaching the same 
question.  I've yet to read it; here's the link for future me in case I forget: 
 https://security.googleblog.com/2023/01/supporting-use-of-rust-in-chromium.html

Cheers,

ellie

------------------------------------------
Cyrus: Devel
Permalink: 
https://cyrus.topicbox.com/groups/devel/Td6cb24beaec381fe-M4738fd5fa5aa8aecce79ea9a
Delivery options: https://cyrus.topicbox.com/groups/devel/subscription

Reply via email to