Skip to main content

Module hybrid

Module hybrid 

Source
Expand description

C11 & C++20 target emitter for NV Hybrid FFI codegen.

Emits two clean, binary FFI headers:

  1. <Stem>HybridAbi.generated.h: pure C11 header including nv_abi.generated.h, declaring NV_HYBRID_<NAME>_INTERFACE_ID, NV_HYBRID_<NAME>_SCHEMA_HASH, #[repr(C)] POD structs/enums, NvHybridOwnedBytes, POD NvHybridOpt*, and NvHybrid<Name>VTable.
  2. <Stem>HybridSpec.generated.hpp: C++20 namespace nv::hybrid with enum class, native structs with NvBinValue encode_bin / decode_bin over the static nv::host_cxx runtime (packages/core/host-cxx), Nitro-style abstract class Hybrid<Name>Spec, and RAII class <Name>Client resolving nv_get_interface + checking schema_hash on construction.

Functionsยง

generate_hybrid_cpp
Emits <Stem>HybridAbi.generated.h (pure C11 ABI), <Stem>HybridSpec.generated.hpp (C++20), and <Stem>HybridWire.generated.h (pure C11 positional wire codec & direct host helpers).