Includes another world, renaming one of its items.
Imports
- interface
kitchen-sink:types/gates@0.1.0unstable: experimental interface
kitchen-sink:types/primitives@0.1.0An interface, by its path in the package.
- interface
kitchen-sink:types/containers@0.1.0 - interface
kitchen-sink:types/shapes@0.1.0 interface
pictures:kitchen-sink:types/resources@0.1.0An interface under a name of its own.
- interface
kitchen-sink:types/resources@0.1.0
interface inline
inlineAn inline interface.
use record point
pointping: func(at: point) -> bool
use enum direction
directiontype compass
compassA type defined in the world.
resource session
sessionA world-level resource.
constructor()end: func()
trace: func(message: string)
trace: func(message: string)A function.
sleep: async func(ms: u64)
sleep: async func(ms: u64)An async function.
volume: get() -> u8
volume: get() -> u8A property of the world.
volume: set(value: u8)
Exports
- interface
kitchen-sink:types/concurrency@0.1.0
serve: async func() -> result<_, string>
run: func(args: list<string>) -> result
WIT
/// Includes another world, renaming one of its items.
world extended {
@unstable(feature = experimental)
import gates;
/// An interface, by its path in the package.
import primitives;
import containers;
import shapes;
/// An interface under a name of its own.
import pictures: resources;
/// An inline interface.
import inline: interface {
use shapes.{point};
ping: func(at: point) -> bool;
}
import resources;
use shapes.{direction};
/// A type defined in the world.
type compass = direction;
/// A world-level resource.
resource session {
constructor();
end: func();
}
/// A function.
import trace: func(message: string);
/// An async function.
import sleep: async func(ms: u64);
/// A property of the world.
import volume: get() -> u8;
import volume: set(value: u8);
export serve: async func() -> result<_, string>;
export run: func(args: list<string>) -> result;
export concurrency;
}