# Dependencies A guiding principle of the **formulate** crate is to not load it up with dependencies just for the sake of convenience. Every dependency chosen should provide functionality that would take me a significantly longer time to write *and validate properly with tests*. There are two types of dependencies (deps) in the project generally, crates providing critical functionality, and those providing convenience features. Critical deps will be added as needed and are here to stay for the length of the project. There is the expectation that once added they will not be changed throughout a MAJOR version (using [semver](https://semver.org/) versioning). As **formulate** isn't a library being consumed by others, that shouldn't affect end users. The other type of dependencies are convenience deps. These could changed, added or removed through MINOR versions. As mentioned earlier though, a design goal for **formulate** is to not load it up with dependencies. Convenience dependencies are added very thoughtfully. A description below is provided on the current direct dependencies the **formulate** crate has and how they are being used. ## Critical dependencies - `rocket` - provides core framework used to create the API endpoints. Does so with an emphasis on correctness and security. - `lettre` - provides core email creation and sending functionality. ## Convenience dependencies - `either` - Already a dependency being pulled into the project by the `rocket` crate. Used to perform actions based on the presence of one specific type, out of two possibilities. - `once_cell` - Already a dependency being pulled into the project by multiple crates. Is considered to be the "standard" crate for lazy initialization of values and is used for this purpose. Its API has been accepted for inclusion into rust "std" and *should* be stable in version 1.70. Once our minimum safe rust version (MSRV) has been increased to 1.70, it will likely be removed for built-in std functionality. - `regex` - Already a dependency being pulled into the project by multiple crates. Used to perform the allowlist checks. - `tera` - Used to create the HTML portion of submitted emails. - `ureq` - Use to make HTTP requests to the stop forum SPAM API. - `validator` - Used for email validations. May be removed in the future. `tera`, `ureq` and `validator` are the only convenience deps not being pulled into the project by other dependencies.