On Windows you can get these by installing the Chocolatey package manager and then running the following commands to install GNU Make and the GNU core utilities:
choco install make
choco install gnuwin32-coreutils.portable
For other platforms, see platform documentation for installing a compatible version of GNU make and GNU core utilities.
On all platforms run the following in the VireoSDK
folder to install JavaScript-based tooling needed for the test infrastructure:
npm install
- Python (>= 3.12)
- emsdk toolchain (see following)
Note: Windows 10 may include a a copy of python seen by running which python
resulting in the path: C:\Users\<USER>\AppData\Local\Microsoft\WindowsApps\python.exe
. Make sure to install a copy of python from python.org
.
The emsdk toolchain is used to cross-compile Vireo to Vireo.js to run in Node.js and web browser environments.
-
Create a directory outside of the
VireoSDK
folder to store the emsdk toolchain binaries. -
Clone the juj/emsdk GitHub repository
-
From the cloned emsdk repository run the following commands:
emsdk install 2.0.23 emsdk activate 2.0.23 emcc -v # should match the sdk version
NOTE: The above commands only add emcc
to the path for your current shell session. The emsdk tool provides the emsdk activate SOME_SDK_VERSION --global
option but there is a known issue where using the --global
flag hangs on Windows.
Instead it is recommended that in a new shell where you wish to build Vireo you run the emsdk_env.bat
(Windows) or emsdk_env.sh
(Mac / Linux) from the emsdk folder to update your path variables for the shell session.
For more detailed information about emsdk see the juj/emsdk GitHub repository.
To create a default (release) build of vireo.js:
make js
The above default build of vireo.js is equivalent to:
make js BUILD=release
To create a debug build of vireo.js:
make js BUILD=debug
To create a profile build of vireo.js:
make js BUILD=profile
Notice that vireo.js is created in the dist
folder based on the BUILD
type. For example, a default vireo.js build equivalent to BUILD=release
will be located at: dist/wasm32-unknown-emscripten/release/vireo.js
- Visual Studio 2022 with C++ support, specifically:
- Windows 10 SDK (10.0.20348.0)
- MSVC v142 - VS 2019 C++ x64/x86 build tools (v14.29)
- Open the
Vireo_VS/VireoCommandLine.sln
solution in Visual Studio - Perform a Debug build
Notice the esh executable placed in the dist
folder.
- GCC 4.9
From the root directory run the following:
make native
Notice the esh executable placed in the dist
folder.
There is a flag you can pass to make
to enable AddressSanitizer:
make native ASAN=1
- XCode
Open the Vireo_Xcode/VireoEggShell.xcodeproj
If you prefer to build from the command line, the instructions for building Vireo Linux Native will work on macOS as well.