This reference describes unreleased code on main; no release documents it yet.

rlmesh_env_new

functionExperimental#include <rlmesh.h>[source]

Env handles copy vtables/attributes. State transfers only on success and free_user_data runs once after the last library reference. Free never closes; close runs at most once. A handle may be borrowed by one server/run/session at a time. Free a borrowing server before freeing the env. Close on a busy env fails with RLMESH_ERR_RUNTIME. Callback outputs are taken even on failure; NULL info means {}. Callbacks and state must be safe to move between threads.

RLMeshStatus rlmesh_env_new(
    const RLMeshEnvVtable* env_vtable,
    void* user_data,
    const RLMeshEnvAttributes* env_attributes,
    RLMeshEnv** out
)