HashLink public Dynamic boundary ledger

HashLink treats Dynamic as an interop boundary, not a normal public API design tool. Public APIs that can express dtype or storage-kind relationships use typed generics (Tensor<T>, Field<T>, VectorNdarray<T>, MatrixNdarray<T>, VectorField<T>, MatrixField<T>, StructTensor<S>, StructField<S>).

API surfaceClassificationRetention reason
KernelRaw.launchDynamic(...), launchOnDynamic(...), graph launch methods, launchRetDynamic(...), launchRetsDynamic(...), kernel.ArgBuffer, and native hl.NativeArray<Dynamic> launch bridgeInternal necessary boundaryRuntime kernel calls accept heterogeneous argument lists whose arity and scalar/tensor mix are determined by the compiled descriptor; typed QKernelN wrappers are the user-facing launch API.
TapeRecord.args and Tape.recordKernel(...) / Tape.recordCustom(...) internal replay hooksInternal necessary boundaryTyped QKernelN.launchTape(...) records heterogeneous launch values for reverse/forward replay without exposing Tape.launch(...Dynamic) as the user entrypoint.
GradCheck.check*ToScalar(..., args:Array<Dynamic>, ...)Permanent necessary boundaryGrad checking replays a kernel with the same heterogeneous launch argument list while separately identifying typed differentiable inputs and scalar loss.
Native.kernel_launch*, Native.kernel_launch*_specialized, Native.kernel_launch_ret(s)Permanent necessary boundaryHashLink native ABI passes descriptor-validated heterogeneous runtime values and specialization values through hl.NativeArray<Dynamic> at the explicit bridge boundary.
catch (e:Dynamic) cleanup pathsPermanent necessary boundaryHaxe exception values are dynamic; cleanup must rethrow the original value.
Coverage.snapshot() and Diagnostics.descriptorDump/kernelInfo/valueInfo/health(...)Permanent necessary boundaryThese intentionally return JSON-like anonymous objects for tooling.
Profiler.traceEvents() and Profiler.memoryStats()Permanent necessary boundaryProfiler timelines and memory summaries are backend-defined JSON-like tool artifacts.
CudaGlInterop.registerBuffer(..., glBuffer:Dynamic, ...) and native CUDA/GL registrationPermanent necessary boundaryAvoids forcing the Haxe package to depend on hlsdl while still accepting hlsdl GL buffer objects.
Helper registry class lists using Class<Dynamic>Permanent necessary boundaryHaxe class values for heterogeneous helper classes require dynamic class storage.
Struct.ofN(...) kernel-only marker return valuesPermanent macro boundaryThese values are compile-time DSL markers consumed by KernelBuilder, not runtime data APIs.
Descriptor macro builders (TypeTableBuilder, ArgTableBuilder, ResourceTableBuilder, StructTableBuilder, DescriptorWriter)Permanent macro boundaryBuild macros assemble normalized descriptor metadata as anonymous JSON-like objects; the data does not cross the user runtime API as typed resources.
StructTensor.__create(...) and StructTensor.descriptorResource()Internal/descriptor boundaryQdStruct allocation passes generated schema metadata and descriptor-resource snapshots through JSON-like values. User-facing member access remains typed by dtype-specific tensors where possible.
Grad.zeroGrad, zeroDual, clearAllGradientsInternal/diagnostic boundaryThese operate on descriptor-validated tensor/field values in AD tooling. New user code should use zeroTensorGrad, zeroFieldGrad, zeroTensorDual, and zeroFieldDual.

Removed public Dynamic surfaces:

Compatibility policy:

  • Permanent necessary boundaries are allowed only for native/tooling interop and must not be used as precedent for ordinary APIs.
  • Compatibility shims are not a v3 design goal; remove them instead of extending them when touching the relevant feature.
  • Any new public Dynamic must add a row to this ledger in the same change.
  • tools/check_public_dynamic.sh enforces that new public Dynamic surfaces are explicitly allowlisted.