Expand description
gdscript-api — the Godot engine model, generated from extension_api.json.
The model (engine classes + inheritance chain, methods, properties, signals, enums,
constants, singletons, utility functions, builtin Variant types) plus the hand-authored
GDScript layer the dump omits (pseudo-constants + builtin functions). See
plans/PHASE-2-IMPLEMENTATION-PLAYBOOK.md §4.
§Shape
model::ApiData is the serializable root that xtask codegen-api rkyv-encodes into a
binary blob; EngineApi deserializes it once, rebuilds the name indices, merges the
hand-authored layer, and exposes the lookup API (lookup.rs). The model is Arc-shared
and excluded from per-file timing, so the one-time deserialize is amortized.
§Targets
Native builds embed the blob via include_bytes! (bundled, behind the default
bundled-api feature). The crate never touches std::fs/clocks/threads, so it builds for
wasm32; there the blob is not embedded (Playbook §4.5) — the host fetches it and calls
EngineApi::from_bytes.
Re-exports§
pub use lookup::MemberRef;pub use model::ApiData;pub use model::ApiType;pub use model::ApiVersion;pub use model::BuiltinData;pub use model::BuiltinId;pub use model::BuiltinMember;pub use model::ClassData;pub use model::ClassId;pub use model::ConstInfo;pub use model::DocId;pub use model::ElemRef;pub use model::EnumInfo;pub use model::EnumValue;pub use model::MethodSig;pub use model::OperatorSig;pub use model::Param;pub use model::PropertyInfo;pub use model::SignalSig;pub use model::TyRef;pub use model::UtilityFn;
Modules§
- gdscript_
layer - The hand-authored GDScript layer the engine dump omits (Playbook §4.4).
- generated
- Generated engine-API metadata (version + counts). Produced by
cargo xtask codegen-api. - lookup
- The lookup API over
EngineApi(Playbook §4.3): name → id, member resolution with base walks, subclass tests, and the inherited member set forrecv.<TAB>completion. - model
- The normalized in-memory Godot engine model — the shape of
extension_api.jsonafterxtaskhas resolved its asymmetries (Playbook §4.1/§4.2).
Structs§
- Engine
Api - The loaded, indexed Godot engine model.
Enums§
- Load
Error - An error loading the engine-API blob.
Functions§
- bundled
bundled-apiand non-WebAssembly - The bundled engine-API model, decoded once on first use.
- godot_
version - The Godot version string the bundled engine-API artifact was generated from.