wit-bindgen-cli 0.57.1

CLI tool to generate bindings for WIT documents and the component model.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include <assert.h>
#include "runner.h"

void exports_runner_run() {
  test_resource_borrow_to_test_own_thing_t thing;
  thing = test_resource_borrow_to_test_constructor_thing(42);

  test_resource_borrow_to_test_borrow_thing_t borrow;
  borrow = test_resource_borrow_to_test_borrow_thing(thing);

  uint32_t res = test_resource_borrow_to_test_foo(borrow);
  assert(res == 42 + 1 + 2);

  test_resource_borrow_to_test_thing_drop_own(thing);
}