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
//@ args = '--autodrop-borrows=no'

#include "borrower.h"
#include <assert.h>

void exports_test_resource_borrow_imported_borrow_thing_do_borrow(
    test_resource_borrow_imported_test_borrow_thing_t thing) {
    uint32_t result = test_resource_borrow_imported_test_method_thing_get_int(thing);
    assert(result == 42);
    // We must explicitly drop the borrow, because autodrop borrows is turned off
    test_resource_borrow_imported_test_thing_drop_borrow(thing);
}