PackageTrack
Sign in Get early access

apollovm_wasm

Native (Dart VM) WebAssembly execution for ApolloVM: the wasm_run-backed WasmRuntime, kept out of the core package so apollovm stays FFI-free.

1.2.0 228 downloads/mo #1214 most downloaded on pub.dev ApolloVM/apollovm_dart

What this package is like to depend on

Last release 22 days ago

02 Aug 2026

Too new to tell

only 2 release windows

Nearly every release is documented

notes for 3 of 3 stable releases

Nothing withdrawn

no release was ever pulled

1 months old

3 releases · first in 2026

3 releases in the last 12 months

see the full history below

Release timeline

3 releases · Jul 2026 to Aug 2026
Release Pre-release

Releases

latest 3
  1. 1.2.0 02 Aug 2026
    Release notes

    Language Server Protocol (LSP 3.17) server

    • A Dart-first language server is now part of the apollovm package, exposed as a separate library package:apollovm/apollovm_lsp.dart (the existing package:apollovm/apollovm.dart exports are unchanged). Source lives in lib/src/lsp/.
    • Runnable two ways. Locally over stdio via a new CLI subcommand apollovm lsp; and embedded / web — the library imports no dart:io, so a browser IDE or an AI agent can drive it with decoded JSON-RPC messages via MessageLspEndpoint (no byte framing). StreamLspEndpoint provides Content-Length framing for stdio/sockets. Both share a transport-agnostic LspEndpoint.
    • The server keeps the ApolloVM core read-only: because the AST carries no source positions and the parser discards comments, a small self-contained scanner re-scans raw text for identifier/declaration positions and correlates them back to the AST (the source of truth for semantics). Four strictly separated layers keep LSP logic out of the parser — transport, protocol (LSP 3.17 types), analysis (parse/index/resolve), and server (handlers).
    • Implemented: initialize/shutdown, incremental diagnostics (parse + unresolvable core imports), documentSymbol, hover (kind/signature/type/ documentation), definition; plus single-file references/rename and a basic ranked completion.
    • Parse-error diagnostics are located precisely: since the core parser reports a generic "end of input expected" at offset 0 for most structural mistakes, the server runs a bracket-balance analysis to underline the real culprit (e.g. an unclosed (/{) with a hint, instead of pointing at the top of the file.
    • Companion assets live under lsp/ (excluded from the published package via .pubignore): a VS Code client (lsp/vscode), an example workspace (lsp/example_workspace), and a latency benchmark (lsp/benchmark).
    • Verified with dart analyze (clean), 17 passing tests in test/lsp/ (including full stdio and message-level protocol sessions), and a benchmark comfortably under its latency targets (open, hover, completion).

    Optional Dart package importer (pub.dev / pubspec-compatible)

    • package: imports can now be resolved against real pub packages, via an optional importer exposed at package:apollovm/apollovm_pub.dart (kept out of the web-safe apollovm.dart).
      • Pluggable PackageProvider: PackageConfigProvider (default, VM-only, zero extra deps — resolves through .dart_tool/package_config.json, exact pub semantics) and PubDevProvider (web-compatible) — downloads archives from pub.dev or a configurable/private/mirror host, extracts them in memory, caches them (MemoryPackageCache by default, FilePackageCache on the VM), and honors pubspec version constraints. Built on web-safe libraries only (http, archive, pub_semver, yaml — no dart:io), so it runs on the VM and in the browser.
      • Web/CORS: PubDevProvider accepts an injectable http.Client, a custom host, and a rewriteUrl hook to route requests through a CORS proxy — a ready-made proxy ships in tool/pub_cors_proxy.dart.
      • DartPackageLoader + DartPackageImporter.provision() fetch each reachable package: import transitively and load its source into the VM; injected via the new settable ApolloVM.moduleLoader. A generic CompositeModuleLoader chains loaders.
      • CLI: apollovm run/translate --pub (with --pub-host / --pub-cache) resolves package: imports before executing.
      • Promotes http, archive, pub_semver, yaml to direct dependencies (all web-safe); only the filesystem members (PackageConfigProvider, FilePackageCache) are behind conditional imports with web stubs.
      • See doc/module_resolution.md and example/apollovm_example_pub_importer.dart.

    Language-agnostic package/module import system

    • Cross-module imports now resolve and execute. A source file can import symbols (classes, functions, enums, type aliases) from other loaded modules, normalized into a single canonical AST regardless of language.
      • Enriched ASTStatementImport (named/show/hide, wildcard, whole-module prefix alias, per-symbol alias) plus new ASTStatementExport and ASTTypeAlias nodes.
      • New web-safe resolution layer (lib/src/resolution/): pluggable ModuleLoader (in-memory VMModuleLoader), four-level SymbolTables + ImportScope, ModuleResolver, a DependencyGraph (Tarjan cycle detection, Kahn topological order, incremental affectedBy invalidation), structured ImportDiagnostics (missing module/symbol, duplicate symbol, circular import, invalid export), a ResolutionCache, and the ModuleResolutionEngine facade.
      • ApolloVM.resolve() returns aggregated diagnostics; resolution is triggered lazily by the runner and invalidated incrementally on loadCodeUnit.
      • Parse + generate wired for Dart, TypeScript, and Python (named/show/ hide/wildcard/alias/re-export/typedef); other languages keep basic imports and compile unchanged against the additive AST.
      • Golden-test harness extended for multi-<source> (cross-module) tests.
      • See doc/module_resolution.md and example/apollovm_example_imports.dart.

    New language: Go

    • Added first-class Go support — ApolloVM can now parse, execute, and translate Go source (.go / go, alias golang) through the shared AST, bidirectionally with every other supported language (and on-the-fly Wasm).
    • Implemented under lib/src/languages/go/ (go_grammar_lexer.dart, go_grammar.dart, go_generator.dart, go_parser.dart, go_runner.dart) and wired into ApolloVM (getParser/createRunner/createCodeGenerator and the .go file-extension mapping).
    • Supported: top-level and struct receiver methods (func (o *Name) m(...)), struct types with fields and factory constructors (func NewName(...) *Name), var/:= type inference, if/else if/else, the four for forms (C-style, condition-only as while, range as for-each, infinite / do-while), Go switch (no fall-through), slices/maps ([]T{…}, map[K]V{…}), closures, all arithmetic/comparison/logical/bitwise operators, string + concatenation, and fmt.Println (normalized to the VM's print).
    • Go has no classes: a class is modeled as a struct + receiver methods (the same idiom Lua uses for tables), so OOP code round-trips across all languages. See the README feature tables for the full per-feature matrix; try/catch/throw, inheritance/interfaces, rich enums and generics are not yet implemented for Go.

    MCP-native runtime: expose ApolloVM to AI agents over the Model Context Protocol

    • New apollovm mcp command group exposes ApolloVM as an MCP (Model Context Protocol) server and tools, turning it into a programmable, sandboxed execution engine for AI agents. Built on the official dart_mcp SDK. Subcommands: mcp serve (run the server over stdio or HTTP/SSE via --http <port>), mcp list (tool definitions), mcp call <tool> (one-shot tool invocation for scripting/CI), mcp info, mcp schema, and mcp doctor.
    • Seven tools: apollovm.parse, apollovm.execute, apollovm.translate, apollovm.ast, apollovm.symbols, apollovm.types, apollovm.wasm — parse, run, translate, compile to Wasm, and inspect AST / symbol graph / type table across all supported languages.
    • Security model: file/network access denied by construction (only print is exposed; inputs are inline source only); apollovm.execute runs in a killable isolate so a hard timeout is enforced even against runaway synchronous loops (per-tool configurable via --isolate-tools); input/output size caps (--max-source-chars, --max-output-chars); best-effort process-level memory.
    • New public library package:apollovm/apollovm_mcp.dart (ApolloMcpServer, serveStdio, HttpSseTransport, McpLimits, computeTool).
    • Added dependency dart_mcp: ^0.5.2 (and stream_channel). New mcp-tagged integration tests under test/mcp/. See doc/MCP.md.
    Open source →
    Release notes
    • apollovm: ^2.25.0 (was ^2.0.0) — this runtime decodes what the apollovm Wasm generator encodes, and the boxed-Object cell layout ([tag@0][typeId@4][payload@8]) with its _boxTag* values is a contract between the two: wasm_runner.dart and wasm_generator.dart each carry a comment saying the constants must match.

      ^2.0.0 let pub pair this runtime with any apollovm 2.x, including releases whose box encoding it was never built or tested against — a mismatch that surfaces as a wrong value or a trap at run time, not as a resolution error. The constraint now tracks the release the runtime is cut against; it is widened deliberately, not by default.

      apollovm 2.25.0 is a case in point: it added ?. on a boxed slot, which emits box reads this runtime has to agree with.

    • wasm_run: ^0.2.0+2 (was ^0.2.0+1) — patch upgrade, no API change.

    Open source →
  2. 1.1.0 26 Jul 2026
    Release notes
    • wasm_run: ^0.2.0+1 (was ^0.1.0+2) — a breaking upgrade, absorbed here so that consumers keep the same WasmRuntimeIO API:

      • No install step. dart run wasm_run:setup is gone; the SDK's build hooks download the native library into .dart_tool/lib/ during dart run/dart test/dart compile. That directory is now searched first, along with .dart_tool/wasm_run/ (the wasm_run:build_binaries output) — walking up to every enclosing package root, so a nested package finds a library fetched by its workspace.
      • The bindings moved to flutter_rust_bridge 2.x, so the symbol that identifies a genuine wasm_run library changed (wire_compile_wasmfrb_get_rust_content_hash); validating the old one rejected every 0.2 library.
      • wasm_run 0.2 initializes its Rust bindings asynchronously and no longer finds its own library in a pure-Dart app. WasmRunLibrary.setUp() is now awaited once, lazily, on the first module compile — ensureBooted()/isSupported stay synchronous, as WasmRuntime requires, and only probe for the library.
      • WASM_RUN_DART_DYNAMIC_LIBRARY (the variable wasm_run itself reads) now overrides the library path. The older WASM_RUN_LIB_PATH is still honored, and is finally read as a path: it used to be consulted only on platforms with no known library name, and then joined with candidate directories as if it were a file name.
    • Requires Dart >= 3.10 (build hooks), matching wasm_run 0.2.

    • Known issue (macOS on Apple Silicon). The upstream aarch64-apple-darwin 0.2.0 library is killed by macOS (SIGKILL, Code Signature Invalid) when wasmtime executes JIT-compiled Wasm inside the JIT Dart VM, i.e. under dart run/dart test. Compiling and instantiating modules is fine. Use dart test --compiler exe / dart compile exe there; other platforms are unaffected. See the README.

    Open source →
  3. 1.0.0 13 Jul 2026
    Release notes
    • Initial release: the native (Dart VM) WasmRuntime, extracted from package:apollovm 2.0.0.

      ApolloVM compiles to Wasm everywhere, but executing a module on the Dart VM needs a native engine (wasm_run), which drags an FFI/Rust toolchain — and an old flutter_rust_bridge — into every consumer of apollovm, even the ones that only parse or translate code. That cost now lives here.

      Call registerApolloVMWasmRuntime() to install it; WasmRuntime() then executes on the VM as before.

    Open source →

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive