PineForge v0.1.2-15-g0247b7f
Deterministic PineScript v6 backtest runtime — C ABI reference
Loading...
Searching...
No Matches
Getting Started

A minimal end-to-end build, install, and link in under a minute.

Prerequisites

Requirement Minimum Notes
CMake 3.16
C++ compiler GCC 9, Clang 10, Apple Clang 12 C++17 required.
Eigen 3.3+ Optional — fetched automatically via FetchContent if no system install is found.

Build + test

git clone https://github.com/fullpass-4pass/pineforge-engine.git
cd pineforge-engine
cmake -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build -j
ctest --test-dir build --output-on-failure

Expect 16 tests to pass. The largest (test_integration, test_request_security) take a few hundred milliseconds; everything else completes faster.

Install

cmake --install build --prefix /usr/local

This installs:

  • lib/libpineforge.a — the static runtime
  • include/pineforge/*.hpp — internal headers
  • include/pineforge/pineforge.hthe public C ABI
  • include/pineforge/version.h — generated version macros
  • lib/cmake/PineForge/PineForge{Config,Targets,ConfigVersion}.cmake

After install, downstream CMake projects can pick the runtime up with a single find_package(PineForge) call — see CMake integration.

A first program

#include <stdio.h>
int main(void) {
printf("PineForge %d.%d.%d (%s)\n",
v.major, v.minor, v.patch,
v.commit_sha[0] ? v.commit_sha : "unknown");
return 0;
}
pf_version_t pf_version_get(void)
Runtime version descriptor returned by pf_version_get.
Definition pineforge.h:349
int patch
Patch version.
Definition pineforge.h:352
int minor
Minor version.
Definition pineforge.h:351
int major
Major version.
Definition pineforge.h:350
const char * commit_sha
Short git commit SHA, or "" if unknown.
Definition pineforge.h:353

Compile and run:

cc hello.c -lpineforge -lstdc++ -lm -o hello
./hello
# PineForge 0.1.1 (97c93d3)

That's it — you have a working install. Next steps: