Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Processor declaration

In the previous chapter, you learned how to declare your Adaptor. Now it's time to declare your processor.

As with the Adaptor, you need to declare your processor using cargo metadata. In your Cargo.toml, you should include a section like this:

[package.metadata.prosa.<processor_name>]
proc = "<your crate name>::<path to your processor>"
settings = "<your crate name>::<path to your processor's settings>"
adaptor = []

Of course, in this section you can also list adaptors. You may have generic adaptors that cover most cases.

For an example, see ProSA - Cargo.toml.

If you declare this metadata correctly, you will be able to see your processor, settings, and adaptors when using cargo-prosa.