diff --git a/README.md b/README.md index 55e428e..34bf15f 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,42 @@ cargo install espup --git https://github.com/esp-rs/espup ``` It's also possible to directly download the pre-compiled [release binaries](https://github.com/esp-rs/espup/releases) or using [cargo-binstall](https://github.com/cargo-bins/cargo-binstall). + +## Quickstart +See [Usage](#usage) section for more details. +### Install +- [`no_std`](https://esp-rs.github.io/book/overview/bare-metal.html) + ```sh + espup install + # Unix + . ./export-esp.sh + # Windows + .\export-esp.ps1 + ``` +- [`std`](https://esp-rs.github.io/book/overview/using-the-standard-library.html): + Installing `esp-idf` via `espup` is not mandatory, as [`esp-idf-sys`](https://github.com/esp-rs/esp-idf-sys) already takes care of it, but has some benefits. + ```sh + espup install --espidf-version + # Unix + . ./export-esp.sh + # Windows + .\export-esp.ps1 + ``` + +> **Warning** +> +> The generated export file, by default `export-esp`, needs to be sourced in every terminal +> before building an application. +### Uninstall +```sh + espup uninstall +``` + +### Update +```sh + espup update --toolchain-version +``` + ## Usage ``` diff --git a/src/main.rs b/src/main.rs index 676f6fe..3377c71 100644 --- a/src/main.rs +++ b/src/main.rs @@ -19,7 +19,7 @@ use espup::{ }, }, }; -use log::{debug, info}; +use log::{debug, info, warn}; use std::{ collections::HashSet, fs::{remove_dir_all, File}, @@ -204,6 +204,10 @@ fn install(args: InstallOpts) -> Result<()> { export_environment(&export_file, &exports)?; info!("{} Installation suscesfully completed!", emoji::CHECK); + warn!( + "{} Please, source the export file, as state above, to properly setup the environment!", + emoji::WARN + ); Ok(()) } @@ -290,18 +294,18 @@ pub fn export_environment(export_file: &PathBuf, exports: &[String]) -> Result<( file.write_all(b"\n")?; } #[cfg(windows)] - info!( + warn!( "{} PLEASE set up the environment variables running: '.\\{}'", emoji::INFO, export_file.display() ); #[cfg(unix)] - info!( + warn!( "{} PLEASE set up the environment variables running: '. ./{}'", emoji::INFO, export_file.display() ); - info!( + warn!( "{} This step must be done every time you open a new terminal.", emoji::WARN );