kit

kit
git clone https://git.ryansepassi.com/git/kit.git
Log | Files | Refs | README

host_import_sig_mismatch.wat (465B)


      1 (module
      2   ;; Declares `env.host_add` with signature (i32, i32) -> i32. The companion
      3   ;; harness binds a wrong-shape host function (one parameter instead of
      4   ;; two). Expected: kit's host-import binder rejects the binding before
      5   ;; running test_main, with a diagnostic naming "env.host_add".
      6   (import "env" "host_add" (func $host_add (param i32 i32) (result i32)))
      7   (func (export "test_main") (result i32)
      8     i32.const 2
      9     i32.const 3
     10     call $host_add))