Skip to content

Phase 1 / D5: source maps for .twasm source-level debugging #129

Description

@hyperpolymath

Deliverable 5 of #49. Emit source maps so debuggers step .twasm source, not wasm bytes.

Scope

  • Map emitted instruction byte-offsets → .twasm source spans.
  • Choose the format: DWARF-in-wasm vs. the wasm sourcemap custom section (sourceMappingURL). Record the choice (ADR if it becomes load-bearing).
  • Note: DWARF emission is also the seed of Phase 4 debugger integration (Phase 4: Tooling + developer experience #52) — pick a format that doesn't paint that into a corner.

Acceptance

  • A debugger (or wasm-tools / browser devtools) shows .twasm line/column for examples/01-single-module.twasm.
  • The map is validated against the emitted offsets in a test.

Dependencies

  • Blocked by F (codegen v0). Extends per-example with D1.

Deliverable: Phase 1 / deliverable 5 (docs/PRODUCTION-PATH.adoc §Phase 1). Part of #49.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions