Getting Started

Getting Started with Oa

Install, build, and run your first GPU compute program.

Requirements

  • GPU SDK — includes slangc shader compiler
  • CMake 3.25+ and Ninja
  • Clang (C++20)
  • vcpkg (for dependency management)

Install

Terminal

# Build from source
cmake --preset release && ninja -C build/release
# Install
cmake --install build/release --prefix ~/.local
# Or via vcpkg (private registry)
# Add to vcpkg-configuration.json, then cmake handles it

Hello GPU

Main.cpp

#include <oa/runtime/engine.h>
#include <oa/core/log.h>
int main() {
auto rt = OaEngine::Create({.AppName = "HelloGpu"}).Unwrap();
OaLog::Info("Device: {}", rt.Device.Name);
OaLog::Info("VRAM: {} MB", rt.Device.VramMb);
rt.Destroy();
}

Include Pattern

IncludeWhat
oa/oa.hEverything
oa/runtime.hOaEngine + all runtime
oa/core.hAll core types (CPU only)
oa/ml/tensor.hTensors only
oa/crypto/hash.hSHAKE-256, Merkle tree
oa/network.hTCP + HTTP server