diff --git a/src/ast.rs b/src/ast.rs index 1dc9ab9..d2020a8 100644 --- a/src/ast.rs +++ b/src/ast.rs @@ -1,3 +1,6 @@ +//! Represents the WIT language as a tree. This is the central +//! representation of the language. + use crate::interpreter::Instruction; use std::str; diff --git a/src/decoders/mod.rs b/src/decoders/mod.rs index 96eab66..0ac9d88 100644 --- a/src/decoders/mod.rs +++ b/src/decoders/mod.rs @@ -1 +1,4 @@ +//! Reads the AST from a particular data representation; for instance, +//! `decoders::binary` reads the AST from a binary. + pub mod binary; diff --git a/src/encoders/mod.rs b/src/encoders/mod.rs index 070bf58..ae1611e 100644 --- a/src/encoders/mod.rs +++ b/src/encoders/mod.rs @@ -1 +1,5 @@ +//! Writes the AST into a particular format; for instance, +//! `encoders::wat` writes the AST into a string representing WIT with +//! its textual format. + pub mod wat; diff --git a/src/interpreter/mod.rs b/src/interpreter/mod.rs index 551311a..d9452ab 100644 --- a/src/interpreter/mod.rs +++ b/src/interpreter/mod.rs @@ -1,3 +1,5 @@ +//! A stack-based interpreter to execute instructions of WIT adapters. + mod instruction; mod instructions; pub mod stack;