Skip to content

Create calculator WebAssembly module #28

Description

@avrabe

Write the calculator.wat WebAssembly module.

Tasks

  • Write examples/calculator/calculator.wat
  • Implement: add, subtract, multiply, divide (i32 only)
  • Export functions: calc_add, calc_sub, calc_mul, calc_div
  • Keep it minimal (<100 lines)
  • Test with wasm2wat roundtrip
  • Document expected behavior

Acceptance Criteria

  • Valid WebAssembly module
  • 4 exported functions
  • Unit tests in WASM

Activity

  1. added this to the phase-2-calculator milestone on Jan 9, 2026
  2. avrabe commented on Feb 28, 2026

    @avrabe
    ContributorAuthor

    Completed. Calculator example at examples/calculator/calculator.wat — exports add, subtract, multiply, divide, modulo. Includes README with compile/verify/disasm instructions and BUILD.bazel. See commit 26c1f7b.

  3. added 3 commits that reference this issue on Sep 9, 2026
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

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions