Expand description
Submilli interpreter library.
Re-exports§
pub use asi::Asi;pub use ast::AccessorKind;pub use ast::ArrayLiteralElement;pub use ast::ArrowBody;pub use ast::Ast;pub use ast::BinOp;pub use ast::Binding;pub use ast::BindingKind;pub use ast::CatchClause;pub use ast::ChainPart;pub use ast::ClassMember;pub use ast::ClassModifiers;pub use ast::EnumInitializer;pub use ast::EnumMember;pub use ast::ExportedDecl;pub use ast::Expr;pub use ast::ExprId;pub use ast::ExprKind;pub use ast::Ident;pub use ast::ImportKind;pub use ast::ImportSpecifier;pub use ast::IndexSignatureAnnotation;pub use ast::InterfaceMember;pub use ast::ObjectLiteralField;pub use ast::ObjectLiteralMember;pub use ast::ObjectPatternField;pub use ast::ParamDecl;pub use ast::PatternOrigin;pub use ast::PostfixOp;pub use ast::Stmt;pub use ast::StmtId;pub use ast::StmtKind;pub use ast::SwitchCase;pub use ast::SwitchDefault;pub use ast::TypeAnnotation;pub use ast::TypeAnnotationField;pub use ast::TypeAnnotationKind;pub use ast::TypePredicateAnnotation;pub use ast::UnOp;pub use ast::Visibility;pub use authority::AuthorityCallable;pub use authority::AuthorityCallableKind;pub use authority::AuthorityCheck;pub use authority::AuthorityEdge;pub use authority::AuthorityEffect;pub use authority::AuthorityExposure;pub use authority::AuthorityMap;pub use authority::AuthorityPosition;pub use authority::AuthorityRoute;pub use authority::AuthorityRouteEffect;pub use authority::AuthoritySpan;pub use authority::AuthorityWitnessStep;pub use backtrace::BacktraceMode;pub use backtrace::failure_message;pub use backtrace::render as render_backtrace;pub use capability_derivation::DerivedCapability;pub use capability_derivation::derive_call_site_capability;pub use codegen::SymbolTable;pub use codegen::codegen;pub use compile::CompiledPackage;pub use compile::CompiledScript;pub use compile::PackageSourceModule;pub use compile::ParsedScript;pub use compile::PhaseTimings;pub use compile::ScriptImports;pub use compile::compile_package;pub use compile::compile_package_with_transitive;pub use compile::compile_parsed_script_timed;pub use compile::compile_script;pub use compile::compile_script_owned_by;pub use compile::parse_script;pub use compile::typecheck;pub use compile::typecheck_to_typed_ast;pub use diagnostics::Diagnostic;pub use diagnostics::Severity;pub use doc_comment::DocCapability;pub use doc_comment::DocCapabilityBinding;pub use doc_comment::DocCapabilityBindingKind;pub use doc_comment::DocCapabilityDiagnostic;pub use doc_comment::DocCapabilityLiteral;pub use doc_comment::DocComment;pub use doc_comment::DocParam;pub use doc_comment::DocReturns;pub use doc_comment::DocText;pub use doc_comment::DocUnknownTag;pub use doc_comment::RawDoc;pub use doc_comment::doc;pub use doc_comment::parse_doc_comment;pub use lexer::Lexer;pub use lower_patterns::lower as lower_patterns;pub use mangle::MangledName;pub use package_declaration::AccessorSig;pub use package_declaration::ClassExtends;pub use package_declaration::DefaultValue;pub use package_declaration::Dispatch;pub use package_declaration::EnumVariantValue;pub use package_declaration::FieldSig;pub use package_declaration::MethodSig;pub use package_declaration::NamespaceSymbol;pub use package_declaration::PackageDeclaration;pub use package_declaration::Param;pub use package_declaration::PropertySig;pub use package_declaration::RuntimeFunction;pub use package_declaration::TypeKind;pub use package_declaration::TypeSymbol;pub use package_declaration::ValueKind;pub use package_declaration::ValueSymbol;pub use parser::parse;pub use runtime::RunResult;pub use runtime::RuntimeConfig;pub use runtime::dispatch_main_async;pub use runtime::instantiate_program_async;pub use shape::Shape;pub use source::ModulePath;pub use source::SourceFile;pub use source::Sources;pub use span::FileId;pub use span::LineIndex;pub use span::Span;pub use stdlib::OptionalPackage;pub use stdlib::Stdlib;pub use token::Token;pub use token::TokenKind;pub use type_info::FieldInfo;pub use type_info::TypeInfo;pub use type_info::TypeInfoId;pub use type_info::TypeInfoIndex;pub use type_info::TypeInfoKind;pub use type_info::TypeInfoTable;pub use typechecker::capability_binding_type;pub use typechecker::capture;pub use typechecker::capture;pub use typechecker::check;pub use typechecker::desugar;pub use typechecker::desugar;pub use typechecker::infer;pub use typechecker::infer;pub use typechecker::infer_package;pub use typed_ast::CapturedVar;pub use typed_ast::ClosureBody;pub use typed_ast::EnumVariantPayload;pub use typed_ast::ExportEntry;pub use typed_ast::ExportKind;pub use typed_ast::FieldNarrowingCheck;pub use typed_ast::FieldNarrowingTest;pub use typed_ast::ForOfKind;pub use typed_ast::GenericArgument;pub use typed_ast::GlobalKind;pub use typed_ast::InterfaceCarrier;pub use typed_ast::InterfaceNarrowingTest;pub use typed_ast::Intrinsic;pub use typed_ast::PostfixTarget;pub use typed_ast::TypedArrayElement;pub use typed_ast::TypedAst;pub use typed_ast::TypedCatchClause;pub use typed_ast::TypedChainPart;pub use typed_ast::TypedClassAccessor;pub use typed_ast::TypedClassConstructor;pub use typed_ast::TypedClassDecl;pub use typed_ast::TypedClassField;pub use typed_ast::TypedClassMethod;pub use typed_ast::TypedExpr;pub use typed_ast::TypedExprKind;pub use typed_ast::TypedFunction;pub use typed_ast::TypedGlobal;pub use typed_ast::TypedInterfaceDecl;pub use typed_ast::TypedInterfaceMember;pub use typed_ast::TypedNumberEnumDecl;pub use typed_ast::TypedNumberEnumMember;pub use typed_ast::TypedObjectFieldOrigin;pub use typed_ast::TypedObjectFieldSource;pub use typed_ast::TypedObjectLiteralField;pub use typed_ast::TypedObjectMember;pub use typed_ast::TypedParam;pub use typed_ast::TypedStmt;pub use typed_ast::TypedStmtKind;pub use typed_ast::TypedStringEnumDecl;pub use typed_ast::TypedStringEnumMember;pub use typed_ast::TypedSwitchCase;pub use typed_ast::TypedSwitchValue;pub use typed_ast::TypedTypeAliasDecl;pub use typed_ast::TypedTypeDecl;pub use typed_ast::TypeofTagKind;pub use types::IndexSignature;pub use types::ObjectField;pub use types::Package;pub use types::TupleType;pub use types::Type;pub use types::TypePredicate;
Modules§
- arena
- Checked storage operations shared by the parsed and typed AST arenas.
- asi
- ast
- authority
- Deterministic package authority call graphs.
- backtrace
- Trap → Submilli-source backtrace rendering.
- capability_
derivation - codegen
- Codegen — translates a typechecked Typed AST into a Wasm module.
- compile
- End-to-end source-to-Wasm pipeline.
- compiler_
error - Typed failures shared by compiler phases and compilation entry points.
- compiler_
limits - Compiler limits, and the native stack embedders provide for compilation.
- diagnostics
- did_
you_ mean - Edit-distance “did you mean?” suggestions.
- doc_
comment - JSDoc-style doc comments.
- lexer
- lower_
patterns - Pre-infer pass eliminating destructuring patterns from
Ast. Runs betweencrate::parseand [crate::infer]; downstream sees only plainLet/Const/ObjectRest/ForOfandParamDeclwithpattern: None. Synthesised array-patternIndexAccessnodes are tagged inAst::pattern_originsso the typechecker can rephrase index errors as destructure-specific diagnostics. - mangle
- Fully-qualified symbol naming:
<package>#<symbol>for public/top-level package symbols. Internal module symbols use a separatemod:namespace so they cannot collide with package-public names. TreatMangledNameas opaque; use the constructors rather than depending on the textual format. - package_
declaration - Top-level declarations of a module, indexed by symbol space.
- packages
- Package discovery over the standard library, plus the prelude built-in
catalog (
builtins/builtin_docs). - parser
- rendering
- Bounded diagnostic output. Truncation is presentation, not a compiler failure.
- runtime
- Wasmtime engine configuration for Submilli.
- shape
- Concrete value shapes that need a Wasm subtype emission.
- source
- The source registry: maps a
FileIdto its source text and display path. - span
- stdlib
- Standard-library packages user code reaches via
import—submilli:crypto/submilli:embedding/submilli:fs/submilli:http/submilli:llm/submilli:secrets/submilli:security/submilli:session/submilli:url/submilli:uuid. - token
- tree_
height - Structural height limits for syntax and typed trees.
- type_
info - type_
size - Size and depth bounds for
Typevalues. - typechecker
- typed_
ast - types