The rust
plugin is useful for building Rust-based parts using the Cargo package manager to drive the build.
This plugin uses the common plugin keywords as well as those for “sources”. For more information, see Snapcraft parts metadata.
Additional features and syntax are dependent on which base is being used, as outlined below:
See Rust applications for a simple example, or search GitHub for projects already using the plugin.
This is a snapcraft plugin. See Snapcraft plugins and Supported plugins for further details on how plugins are used.
If a rust-toolchain file is detected, the toolchain it specifies will be used by default otherwise the latest stable toolchain will be used.
rust-features
(list of strings)rust-path
(list of strings)Requires Snapcraft version 4.0+.
rust-channel
(string)rust-features
(list of strings)rust-revision
(string)If a rust-toolchain file is detected, the toolchain it specifies will be used by default. However, if rust-channel
or rust-revision
are set, the rust-toolchain file will be overridden.
If neither a rust-toolchain exists nor rust-channel
or rust-revision
are set, the latest stable toolchain will be used.
Requires Snapcraft version 3.x.
Last updated 4 months ago. Help improve this document in the forum.