Building GeckoView on WSL(2) basically works out of the box like building it natively on Linux with mach.
Running your build is the real issue.
You generally have two options for running:
- Run GeckoView in an emulator
- Run GeckoView natively on a phone
Trying to launch an emulator is likely to run into KVM errors, although apparently this has been fixed in the latest versions of Windows 11 (haven't confirmed).