Expand description
The Host API schema, and what a value has to be for a declared type to admit it.
The schema itself is cove_schema, a crate below both this one and the
compiler, because ADR 0001 makes it “shared by the compiler, runtime, and
CLI” and the dependency between those two runs one way. Everything it
declares is re-exported here, so a host written against the runtime still
names one crate: cove_runtime::schema::HostType is
cove_schema::HostType.
What is not there is Admits, which is the only part of the schema
that needs values. A HostType is a description and a Value is the
runtime’s; this is where the two meet, so it lives on the side of the
boundary where values live. The compiler answers the same question against
its own Ty, at the call site, where a mistake still has a span.
Modules§
- hosts
- What the host modules the toolchain ships declare about themselves.
Structs§
- Field
Schema - One field of a host type.
- Mismatch
- Where a value stopped agreeing with the type declared for it, and what was found there instead.
- Module
Schema - The name, capability, operations, types, and resources of one host module.
- Operation
Schema - One operation of one host module.
- Resource
Schema - One kind of host resource: a value the host owns and Cove only names.
- Type
Schema - The shape of one type a host declares.
Enums§
- Effect
- Whether an operation observes the world or changes it, and whether the change can be taken back.
- Host
Type - A type in a Host API signature, written in Cove’s source vocabulary.
- Part
- Which part of a call a mismatch was found in.
Traits§
- Admits
- Whether a value is one a declared type admits.