next up previous contents
Next: Writing C FFI Code Up: The Ur/Web Manual Previous: Tasks   Contents


The Foreign Function Interface

It is possible to call your own C and JavaScript code from Ur/Web applications, via the foreign function interface (FFI). The starting point for a new binding is a .urs signature file that presents your external library as a single Ur/Web module (with no nested modules). Compilation conventions map the types and values that you use into C and/or JavaScript types and values.

It is most convenient to encapsulate an FFI binding with a new .urp file, which applications can include with the library directive in their own .urp files. A number of directives are likely to show up in the library's project file.



Subsections
next up previous contents
Next: Writing C FFI Code Up: The Ur/Web Manual Previous: Tasks   Contents
2014-07-14