I don't know if this is possible. If I create an application, distributed as a closed-source native binary, can I also distribute plugins a separate binary files that extend the functionality of that app? Or is there not enough stable ABI for this?

The plugin would need to be able to use types in the application, and implement traits defined in the application.

// Define in app binary pub trait Plugin { fn name(&self) -> String; fn startup(&self) -> anyhow::Result<()>; ... } pub struct Document { fn block(&self, node_id: NodeId) -> Option<&Block> { ... } fn span(&self, node_id: NodeId) -> Option<&Span> { ... } } // In plugin binary struct ThisPlugin { ... } impl Plugin for ThisPlugin { ... } fn do_stuff(doc: &Document) { let b = doc.block(id) ... } 

1 post - 1 participant

Read full topic