I published a package some time ago. Now I added some features by creating a rust plugin and I would like to publish the update. What files of the rust plugin should I keep inside the package?
This is the file structure of the rust plugin:
src/
csharp.rs
java.rs
lib.rs
model.rs
php.rs
target/ (I don't think this folder is needed)
Cargo.lock
Cargo.toml
[commit & include] files that are necessary for the package to work.
Plugin source files are not needed for your package to work – the WASM plugin is. In general, since Rust is a compiled language, when you publish a release of your project, you collect the relevant compiler outputs (i.e. select files from target/) and don’t distribute the source code (even though it is still available as open source).
I have a small (unpublished) project as a proof of concept for a package with a Typst plugin, here. In there, I prepare the plugin like this: