‘brevity is the soul of wit’ –– Polonius in Shakespeare’s Hamlet
This is a Kotlin implementation of a WIT processor. It compiles WIT specifications into Kotlin interfaces, as well as host and guest bridging code for the WASM runtime.
See the Explainer, Overview and Spec.
This project contains documentation and specifications copyrighted by the W3C WebAssembly Community Group, licensed under the Apache license.
- brevity: A runtime library for running components in Kotlin. It declares built-in types for
TupleandResulttypes. - brevity-build: Gradle project so we can run Brevity’s Gradle plugin in Brevity’s own build.
- brevity-gradle-plugin: integrates Brevity with Gradle.
- brevity-integration-tests: executes generated API stubs on the Chicory runtime.
- brevity-kotlin-generator: uses parsed
.witfiles to generate.ktfiles. - brevity-testing: test facets for our own internal testing.
- brevity-wasi-main: Compiles the WASI main branch (Preview 3) to Kotlin.
- brevity-wasi-p1: A hand-authored host binding for WASI Preview 1. We can't use Brevity to
generate this, because WASI Preview 1 cannot be expressed with
.wit. - brevity-wasi-p2: Compiles the WASI 0.2.0 tag (Preview 2) to Kotlin.
- brevity-wit: Parses and models
.witfiles.
We have several different representations of the .wit code, that fit together in a pipeline.
- io: a direct representation of the
.witsource code. This isn’t linked and so type references are just strings and not resolved. UseIoWitPackageReaderto load this model. - ir: a linked representation of an entire project. Type references are resolved to their
fully-qualified values. Includes are applied, so worlds contain their full transitive
dependencies. This representation doesn’t model syntactic sugar like
UseandInclude. UseIrMapperto transformiointo this model. - api: a user-facing Kotlin API for a project, represented as
KotlinPoetfiles.