Section II - Creating a Library
The Rust package comes automatically setup with a unit test in the src/lib.rs file. You can build and test your package in one command.
By default, the manifest file (Cargo.toml) has only the [package] section which contains the meta data about the package. The [dependencies] section is empty. Since we create this package as a library, the [lib] section is "assumed" and the src/lib.rs file is the default location and file name of the library module.
We will overwrite the defaults by adding the following lines to the Cargo.toml file after the [package] section.
try to rerun the build and test and notice that the library name changed from rust-daas to daas.
Last updated
Was this helpful?