ravel
Deterministic simulation testing for C++. Seed a bug, replay it exact.
Loading...
Searching...
No Matches
ravel.h
1#ifndef RAVEL_H
2#define RAVEL_H
3
4/* C ABI surface — for FFI from languages/engines that can't link C++
5 * directly. Mirrors the subset of ravel::Simulation needed to run a
6 * simulation and read back a pass/fail + seed. Opaque handle, no exceptions
7 * cross this boundary: every function returns a status code instead. */
8
9#include <stdint.h>
10
11#ifdef __cplusplus
12extern "C" {
13#endif
14
15#if defined(RAVEL_SHARED) && defined(_WIN32)
16# ifdef RAVEL_BUILD_SHARED
17# define RAVEL_API __declspec(dllexport)
18# else
19# define RAVEL_API __declspec(dllimport)
20# endif
21#else
22# define RAVEL_API
23#endif
24
25typedef struct ravel_simulation ravel_simulation; // NOLINT(modernize-use-using): C header
26
27RAVEL_API ravel_simulation* ravel_simulation_create(uint64_t seed);
28RAVEL_API void ravel_simulation_destroy(ravel_simulation* sim);
29RAVEL_API int ravel_simulation_run(ravel_simulation* sim); /* 1 = ok, 0 = failed */
30RAVEL_API const char* ravel_version_string(void);
31
32#ifdef __cplusplus
33}
34#endif
35
36#endif /* RAVEL_H */