|
| 1 | +#Installation on Windows |
| 2 | + |
| 3 | +:pencil2: Author: Sreeram Peela |
| 4 | + |
| 5 | +**Pre-requisites** |
| 6 | + |
| 7 | +Rust is the programming language of choice for complex tasks these days. Installing micro**BioRust** |
| 8 | +in windows requires Rust to be installed and the PATH variables to be added. |
| 9 | + |
| 10 | +We recommend installing Rust (and micro**BioRust**) using Windows Powershell (logged as admin). |
| 11 | + |
| 12 | +Alternately, the latest executables for GUI-based installation can be found here: |
| 13 | +[https://www.rust-lang.org/tools/install](https://www.rust-lang.org/tools/install) |
| 14 | + |
| 15 | +1. Navigate to the directory of your choice and open Powershell in admin mode. |
| 16 | +2. Download Rust executable from Powershell using the command: |
| 17 | + |
| 18 | +``` |
| 19 | +Invoke-WebRequest |
| 20 | +-Uri https://static.rust-lang.org/rustup/dist/x86_64-pc-windows-msvc/rustup-init.exe |
| 21 | +-OutFile rustup-init.exe |
| 22 | +# Run the below command to start installation |
| 23 | +.\rustup-init.exe``` |
| 24 | + |
| 25 | +``` |
| 26 | +> :mega: Installing Rust typically can be made through Visual Studio Community installer (Select option 1 when prompted). This documentation is written by selecting this option |
| 27 | +
|
| 28 | +Installation VS community installer requires downloading additional packages - Win11_SDK and .. Please note that both these require almost 6GB of memory !! |
| 29 | + |
| 30 | +3. Select ‘Default installation’ when prompted. |
| 31 | +4. After a typical installation is over, close the powershell and reopen it to make changes in the PATH. |
| 32 | + |
| 33 | +**# Check if installation is successful** |
| 34 | +``` |
| 35 | +cargo help |
| 36 | +``` |
| 37 | + |
| 38 | +For a successful installation, the above command will display different options and subcommands in Cargo. We will be using this for installing microBioRust (or any Rust package). |
| 39 | + |
| 40 | +**Install microBioRust** |
| 41 | + |
| 42 | +The micro**BioRust** repo is being hosted on GitHub [here](https://github.com/LCrossman/microBioRust). We recommend using Git for smooth installation. Alternatively, users can download the repo as a ZIP file, uncompress it (with your own choice of tools), and navigate to the directory. |
| 43 | + |
| 44 | + |
| 45 | +**# Clone the repo using Git** |
| 46 | +``` |
| 47 | +git clone https://github.com/LCrossman/microBioRust.git |
| 48 | +``` |
| 49 | + |
| 50 | +**# Navigate to the dir** |
| 51 | +``` |
| 52 | +cd microBioRust |
| 53 | +``` |
| 54 | + |
| 55 | +Inside the directory, one can use Cargo to build the library. |
| 56 | + |
| 57 | +``` |
| 58 | +# Inside the project directory |
| 59 | +cargo build |
| 60 | +``` |
| 61 | + |
| 62 | +>:arrow_right: The above command downloads and installs necessary dependencies for smooth functioning of the package. Please wait until all the required dependencies are installed and compilation for micro**BioRust** is completed. |
| 63 | + |
| 64 | + |
| 65 | +Once the package has been built, it is a general practise to test whether installation was successful. For testing the installation, run the command: |
| 66 | + |
| 67 | +``` |
| 68 | +# test installation of the package |
| 69 | +cargo test |
| 70 | +``` |
| 71 | + |
| 72 | +The above test instance runs over multiple files packed with the repo, and a final output message can help us in understanding errors. Typically, successful installation gives the following last few lines: |
| 73 | + |
| 74 | +{ loading=lazy } |
| 75 | + |
| 76 | +Congratulations!! You have successfully installed microBioRust in your system. You can proceed with Getting started section of the documentation. |
| 77 | + |
| 78 | +> Session Information: |
| 79 | +
|
| 80 | +{ loading=lazy } |
| 81 | +{ loading=lazy } |
0 commit comments