trampoline should work at some callback method which will match these code. most provide callback should be like these!
```c
// liba.so
void call_mul_at_callback(int i, void (*on_complete) (void*,void*), void* user_data) {
// user_data = ctx
// work_code
int v = i * i + i* i * i << 12 - 5 *i;
printf("from janet ffi\n");
on_complete(&i, user_data);
printf("FFI CALLBACK COMPLETE\n");
}
```
```janet
(ffi/context "liba.so")
(ffi/defbind call-mul-at-callback :void (i :int callback :ptr data :ptr))
(def cb (delay (ffi/trampoline :default)))
(call-mul-at-callback 15
(cb)
(fn[ptr]
(let [args (ffi/read (ffi/struct :int) ptr)]
(print (string/format "got value %d from ffi"
(first args))))))
```