Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions .gitconfig

This file was deleted.

7 changes: 0 additions & 7 deletions .vscode/extensions.json

This file was deleted.

85 changes: 0 additions & 85 deletions .vscode/settings.template.jsonc

This file was deleted.

197 changes: 0 additions & 197 deletions .vscode/tasks.json

This file was deleted.

41 changes: 7 additions & 34 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,18 @@ After following this guide, you will be able to execute all the local PC develop
To run all repository tooling locally, you will need the following prerequisites:

* [Latest version of LLVM](https://github.com/llvm/llvm-project/releases)
* Select: ☑️ Add LLVM to the system PATH for the current user
* [Visual Studio Build Tools for C++](https://visualstudio.microsoft.com/visual-cpp-build-tools/) with components:
* Workload: Desktop development with C++
* [Latest version of Visual Studio Code](https://code.visualstudio.com/Download) with extensions:
* C/C++ (ms-vscode.cpptools)
* rust-analyzer (rust-lang.rust-analyzer)
* WSL (ms-vscode-remote.remote-wsl)

> 💡 Using an IDE other than Visual Studio Code is possible, though the setup process is not documented here.

* [Latest version of Git](https://git-scm.com/downloads/win) with components:
* Git LFS (Large File Storage)
* [Latest version of PowerShell 7](https://learn.microsoft.com/en-us/powershell/scripting/install/installing-powershell-on-windows)

For detailed configuration of the above, use your own judgement - the defaults should work but customization is also generally fine.

The following directories must be in PATH:

* `c:\Program Files\LLVM\bin`

This guide assumes a clean Windows PC in other regards.

# Windows environment setup
Expand All @@ -39,23 +35,20 @@ After installing the Rust toolchain, we setup repository-specific tooling:
> 💡 Even though the Windows and Linux development environments are largely independent, they will both use the same working directory (created by the above `git clone` command). This allows you to build and test your changes immediately on both operating systems.

2. Switch to the `oxidizer` directory: `cd oxidizer`.
2. Execute `git config --local include.path ./.gitconfig` to attach the repo-specific Git configuration.
2. Execute `just anvil-setup` to install all necessary Rust toolchain versions and development tooling.
2. Execute `Install-Module -Name Pester -RequiredVersion 5.7.1 -Force -Scope CurrentUser -SkipPublisherCheck` to install the release-script test dependency.
2. Open `.vscode/settings.template.jsonc` and save a copy as `.vscode/settings.json` to apply repo-specific settings for Visual Studio Code. Part of this file should be the same for everyone but the rest you can customize - refer to inline comments.

## Validate Windows environment

1. Execute `just anvil-build` to build the workspace. Verify that the build is successful.
1. Execute `just anvil-pr-test` to execute the test and coverage group. Verify that it succeeds.
1. Execute `just test-scripts` to run the Pester suite for the release-related PowerShell scripts. Verify that all tests pass.
1. Validate that debugging works by opening `crates/tick/examples/tick_basic.rs` and pressing the `Debug` link that appears above `main()`. This should successfully launch the example app under the debugger.

# Linux (WSL) environment setup

The Linux distribution we use for development is **Ubuntu 24.04**, running as a WSL virtual machine.
The Linux distribution we use for development is **Ubuntu**, running as a WSL virtual machine.

1. Install [Ubuntu 24.04.1 LTS](https://apps.microsoft.com/detail/9NZ3KLHXDJP5?hl=en-us&gl=US&ocid=pdpshare) from the Microsoft Store.
1. Install [Ubuntu](https://apps.microsoft.com/detail/9PDXGNCFSCZV?hl=en-us&gl=US&ocid=pdpshare) from the Microsoft Store.
1. Open an Ubuntu terminal (e.g. from the Microsoft Store page, from the Start menu or in Windows Terminal).
* If you get an error about a required feature not being installed, try first restarting the PC to complete the feature installation.
1. You will be asked to create a user account the first time you run Ubuntu. This is a local account unique to the Linux VM and is not related to your account on the host machine.
Expand All @@ -67,7 +60,7 @@ Next, we upgrade, install and configure development prerequisites:
1. Execute `sudo apt update && sudo apt dist-upgrade -y` to upgrade everything that is already installed.
1. Execute `sudo apt install -y curl clang llvm libclang-dev gdb perl python3 python3-pip git git-lfs build-essential cmake pkg-config libssl-dev valgrind` to ensure that essential packages are installed.
1. [Install PowerShell 7](https://learn.microsoft.com/en-us/powershell/scripting/install/install-ubuntu?view=powershell-7.5#installation-via-package-repository-the-package-repository).
1. Execute `git config --global credential.helper "/mnt/c/Program\ Files/Git/mingw64/bin/git-credential-manager.exe"` to set the correct Git authentication flow.
1. Execute `git config --global credential.helper "/mnt/c/Program\ Files/Git/ucrt64/bin/git-credential-manager.exe"` to set the correct Git authentication flow.
1. Execute `curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh` and install Rust with all default settings.
1. Reopen the terminal to apply changes.
1. Execute `cargo install just --locked` to install the Just utility (unless already installed).
Expand Down Expand Up @@ -96,26 +89,6 @@ After installing the Rust toolchains, we setup the build target directory for fa
1. Execute `just anvil-pr-test` to execute the test and coverage group. Verify that it succeeds.
1. Execute `just test-scripts` to run the Pester suite for the release-related PowerShell scripts. Verify that all tests pass.

## Setup Visual Studio Code integration

Visual Studio Code is also our standard Linux IDE and requires some additional setup to work with the Linux workspace.

> ⚠️ While the IDE runs on the Windows desktop, all tooling runs in the Linux VM, including Visual Studio Code extensions. The below steps will instruct you to install the minimum set of required Visual Studio Code extensions for the Linux environment.

1. In an Ubuntu terminal, in the `oxidizer` directory, execute `code .` to open the project in Visual Studio Code.
1. Open the Extensions panel in Visual Studio Code.
1. Install following extensions by selecting "Install in WSL" for each:
* C/C++ (ms-vscode.cpptools)
* rust-analyzer (rust-lang.rust-analyzer)
1. Close Visual Studio Code and open it again via `code .` to complete extension setup.

Validate the setup by executing the following tasks from the task palette (F1):

1. `Tasks: Run Build Task`
1. `Tasks: Run Test Task`

Validate that debugging works by opening `crates/tick/examples/tick_basic.rs` and pressing the `Debug` link that appears above `main()`. This should successfully launch the example app under the debugger.

# Before submitting a pull request

Run all essential CI checks locally with a single command:
Expand Down
Loading
Loading