DriftScript bindings · function
engineImplementations
The implementation map a generated module's __bind receives.
Explained in Setting up scripts.
function engineImplementations(services: HostServices): Record<string, unknown>import { engineImplementations } from '@driftengine/script';Parameters
| Parameter | Type | Description |
|---|---|---|
services | HostServices |
In depth
Keyed by logical module name, because that is what generated code looks up: audio in a .drs
file is $host['drift/audio'] in the output.
A service the consumer did not supply is absent rather than stubbed. A module that binds it and then calls it fails at the call with the namespace's own name in the error, which is what the rule against silent no-ops asks for — a stub that quietly did nothing would make a script that plays no sound indistinguishable from one whose audio is not connected.