The guest side has three separate APIs: contract system API, service system API and view system API. This does not match the host side, which has a parent BaseRuntime trait and ContractRuntime and ServiceRuntime traits. Not only does this make maintenance a bit more complicated, but it also prevents moving the write_batch system API to be contract-specific.
Proposal
Refactor the WIT system APIs to follow the host layout, making use of the ability to include WIT interfaces in worlds so that the base runtime is only defined once, and also moving the write_batch system API to be contract specific.
Motivation
The guest side has three separate APIs: contract system API, service system API and view system API. This does not match the host side, which has a parent
BaseRuntime
trait andContractRuntime
andServiceRuntime
traits. Not only does this make maintenance a bit more complicated, but it also prevents moving thewrite_batch
system API to be contract-specific.Proposal
Refactor the WIT system APIs to follow the host layout, making use of the ability to include WIT interfaces in worlds so that the base runtime is only defined once, and also moving the
write_batch
system API to be contract specific.