November 2019
Intermediate to advanced
448 pages
15h 6m
English
The cwrap function is similar to the ccall function. With the cwrap function, you only specify the first three parameters, which are identical to those of ccall:
Unlike with ccall, which executes the function right away, when you call the cwrap function, you’re given a JavaScript function. In JavaScript, functions are first-class citizens and can be passed around like you would a variable, which is one of JavaScript’s most powerful features. The JavaScript function can then be used to call the module’s function, similar to how you’d call a normal function in which you specify the parameter values directly rather than using an array. ...
Read now
Unlock full access