With the following Cargo.toml file:
[package]
name = "something"
version = "0.1.0"
authors = ["Nathan A Sculli <nathan@vegasbuckeye.com>"]
edition = "2018"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
config = "^0.10"
chrono = { version = "0.4", features = ["serde"] }
diesel = { version = "^1.4", features = ["chrono", "mysql", "r2d2"] }
dotenv = "0.15.0"
env_logger = "0.7.1"
log = "0.4"
r2d2 = "0.8"
scrypt = "0.2"
serde = { version = "^1.0", features = ["derive"] }
serde_json = "^1.0"
tokio = "0.2.0-alpha.6"
tokio-executor = "=0.2.0-alpha.6"
uuid = { version = "0.8", features = ["v4", "serde"] }
warp = { git = "https://github.com/seanmonstar/warp.git", branch = "master" }
cargo install --path .
fails to compile with the following error
error[E0433]: failed to resolve: could not find `main` in `tokio`
--> src/main.rs:80:10
|
80 | #[tokio::main]
| ^^^^ could not find `main` in `tokio`
error[E0277]: `main` has invalid return type `impl core::future::future::Future`
--> src/main.rs:81:17
|
81 | async fn main() {
| ^ `main` can only return types that implement `std::process::Termination`
|
= help: consider using `()`, or a `Result`
error: aborting due to 2 previous errors
Some errors have detailed explanations: E0277, E0433.
For more information about an error, try `rustc --explain E0277`.
error: failed to compile `something v0.1.0 (/opt/something)`, intermediate artifacts can be found at `/opt/something/target`
Caused by:
could not compile `something`.
To learn more, run the command again with --verbose.
However, running cargo build --release
compiles sucessfully. I'm lost...