github.com/wasilibs/wazerox@v0.0.0-20240124024944-4923be63ab5f/internal/integration_test/spectest/testdata/spectest.wat (about)

     1  (module $spectest
     2    (global (export "global_i32") i32 (i32.const 666))
     3    (global (export "global_i64") i64 (i64.const 666))
     4    (global (export "global_f32") f32 (f32.const 666))
     5    (global (export "global_f64") f64 (f64.const 666))
     6  
     7    (table (export "table") 10 20 funcref)
     8  
     9    (memory 1 2)
    10      (export "memory" (memory 0))
    11  
    12  ;; Note: the following aren't host functions that print to console as it would clutter it. These only drop the inputs.
    13    (func)
    14       (export "print" (func 0))
    15  
    16    (func (param i32) local.get 0 drop)
    17       (export "print_i32" (func 1))
    18  
    19    (func (param i64) local.get 0 drop)
    20       (export "print_i64" (func 2))
    21  
    22    (func (param f32) local.get 0 drop)
    23       (export "print_f32" (func 3))
    24  
    25    (func (param f64) local.get 0 drop)
    26       (export "print_f64" (func 4))
    27  
    28    (func (param i32 f32) local.get 0 drop local.get 1 drop)
    29       (export "print_i32_f32" (func 5))
    30  
    31    (func (param f64 f64) local.get 0 drop local.get 1 drop)
    32       (export "print_f64_f64" (func 6))
    33  )