Installation

Two parts: the C++ core (gen_ast) that parses your HDL, and the viewer (Node.js). The ./verilens launcher builds both on first use, so this page is mostly about getting the prerequisites in place.

Prerequisites

ToolUsed forNotes
CMake ≥ 3.20 and a C++17 compilerbuilding gen_ast and the core testsApple clang, GCC or MSVC
nlohmann-jsonJSON output of the coreinstalled by the per-OS steps below
GoogleTestcore unit tests onlyoptional if you never run ctest
Node.js ≥ 20 and npmviewer build, tests, launcherdeveloped with Node 24
Google Chromebrowser end-to-end tests onlyPlaywright uses the installed Chrome; no download needed

macOS

git clone https://github.com/AnthonyBSong/VeriLens
cd VeriLens
brew bundle                 # cmake, googletest, nlohmann-json
cmake -S . -B build && cmake --build build
cd packages/web && npm install

Linux

With Nix (any distribution):

nix-shell                   # drops you into a shell with all dependencies
cmake -S . -B build && cmake --build build
cd packages/web && npm install

Without Nix:

# Debian / Ubuntu
sudo apt install cmake libgtest-dev nlohmann-json3-dev nodejs npm
# Arch
sudo pacman -S cmake gtest nlohmann-json nodejs npm

Windows

winget import -i winget-packages.json
vcpkg install
cmake -S . -B build -DCMAKE_TOOLCHAIN_FILE="$env:VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake"
cmake --build build
cd packages\web; npm install
The ./verilens launcher is a Bash script. On Windows run it from Git Bash or WSL, or call the two underlying steps directly: build\core\tools\gen_ast and node packages\web\scripts\build-html.mjs (see Quick start).

Check the installation

cd build && ctest                # core: 167 tests
cd ../packages/web && npm test    # viewer: unit tests
npm run test:e2e                  # viewer: browser tests (needs Chrome)
./verilens --help                 # from the repository root

Nothing to install: take the guided tour

The guided tour on this site embeds the built viewer with a sample design. It is the same single HTML file that ./verilens produces for your own projects.