Struct anchor_codegen::ConfigBuilder
source · pub struct ConfigBuilder { /* private fields */ }Expand description
Build step for generating runtime functions and dictionary
Implementations§
source§impl ConfigBuilder
impl ConfigBuilder
sourcepub fn entry(self, path: impl AsRef<Path>) -> Self
pub fn entry(self, path: impl AsRef<Path>) -> Self
Adds an entry point
The builder will start from all supplied entries, parsing these modules and all their submodules.
Generally this should be done only for the src/main.rs file of a project.
sourcepub fn entry_module(self, path: impl AsRef<Path>, module: &[Ident]) -> Self
pub fn entry_module(self, path: impl AsRef<Path>, module: &[Ident]) -> Self
Like entry but specifies the starting module path.
For src/main.rs this is an empty list, and each submodule adds an element to the module
path. E.g. crate::module::submodule would be [module, submodule].
Generally it should not be necessary to use this function.
sourcepub fn set_version(self, version: impl AsRef<str>) -> Self
pub fn set_version(self, version: impl AsRef<str>) -> Self
Sets the version string that will be placed in the dictionary
sourcepub fn set_build_versions(self, build_versions: impl AsRef<str>) -> Self
pub fn set_build_versions(self, build_versions: impl AsRef<str>) -> Self
Sets the build version string that will be placed in the dictionary
It is customary for this string to be formatted as a space separated list of pairs as so:
gcc: (15:7-2018-q2-6) 7.3.1 20180622 (release) [ARM/embedded-7-branch revision 261907] binutils: (2.31.1-11+rpi1+11) 2.31.1)
Anchor does not enforce this, and allows the user to set any valid string value.
sourcepub fn skip_command(self, command: impl AsRef<str>) -> Self
pub fn skip_command(self, command: impl AsRef<str>) -> Self
Ignores the klipper_command with a given name
This can be used for disabling certain commands in specific builds. Generally it is
preferable to use #[cfg(feature)] tags for disabling commands.