Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
c_bind.cpp
Go to the documentation of this file.
1#include "c_bind.hpp"
6#ifndef NO_MULTITHREADING
7#include <mutex>
8#endif
9
10namespace bb::bbapi {
11
12// Global BBApiRequest object in anonymous namespace
13namespace {
14// NOLINTNEXTLINE(cppcoreguidelines-avoid-non-const-global-variables)
15BBApiRequest global_request;
16} // namespace
17
25{
26 // Execute the command using the global request and return the response
27 return execute(global_request, std::move(command));
28}
29
30} // namespace bb::bbapi
31
32// Use CBIND macro to export the bbapi function for WASM
Shared type definitions for the Barretenberg RPC API.
A wrapper around std::variant that provides msgpack serialization based on type names.
#define CBIND_NOSCHEMA(cname, func)
CommandResponse execute(BBApiRequest &request, Command &&command)
Executes a command by visiting a variant of all possible commands.
CommandResponse bbapi(Command &&command)
Main API function that processes commands and returns responses.
Definition c_bind.cpp:24
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
Definition tuple.hpp:13