Windows Dev Drive setup

Windows Dev Drive setup

Learn how to use Dev Drive to optimize your development experience on Windows 11

Dev Drive is a new Windows addition currently available in Windows Insiders Dev channels. Dev Drive utilizes the ReFS filesystem to optimize developers experience

Setting up Dev Drive

To access Dev Drive, currently, you will need Windows 11 Insider Dev channel build, which you can opt-in here: https://www.microsoft.com/en-us/windowsinsider/getting-started

After installing Dev channel build, you can follow these steps to create your Dev Drive: https://learn.microsoft.com/en-us/windows/dev-drive/#set-up-options

Personally, I chose the VHDX approach, as it is the easiest way to test new features without any hustle of allocating any disk volumes.

Package tools cache

Windows Dev Drive can be used to store package cache and speed up your dependencies installation time.

Rust and Cargo

setx /M CARGO_HOME E:\Packages\.cargo

You also will need to modify your environment variables manually by changing one your %PATH% variable entries from C:\Users\<user>\.cargo\bin to %CARGO_HOME%\bin

After these changes, you can manually move your previous .cargo to the new location.

Yarn

yarn cache clean
yarn config set cache-folder E:\Packages\Yarn\Cache

NPM

npm config set cache E:\Packages\npm-cache --global

Don't forget to delete the old cache directory %LocalAppData%\npm-cache

Python Pip

setx /M PIP_CACHE_DIR E:\Packages\pip

Don't forget to delete the old cache directory %LocalAppData%\pip\Cache

PlatformIO

setx /M PLATFORMIO_CORE_DIR E:\Packages\.platformio

After running this command, you will need to delete the old installation (presumably, C:\Users\<user>\.platformio) and install PlatformIO once again.

You also will need to modify your %PATH% variable by adding %PLATFORMIO_CORE_DIR%\penv\Scripts entry.

Nuget package cache

setx /M NUGET_PACKAGES E:\Packages\.nuget\packages

vcpkg cache

setx /M VCPKG_DEFAULT_BINARY_CACHE E:\Packages\vcpkg