Import Debian changes 20180207-1
[hcoop/debian/mlton.git] / doc / guide / localhost / ForeignFunctionInterface
CommitLineData
7f918cf1
CE
1<!DOCTYPE html>\r
2<html lang="en">\r
3<head>\r
4<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">\r
5<meta name="generator" content="AsciiDoc 8.6.9">\r
6<title>ForeignFunctionInterface</title>\r
7<link rel="stylesheet" href="./asciidoc.css" type="text/css">\r
8<link rel="stylesheet" href="./pygments.css" type="text/css">\r
9\r
10\r
11<script type="text/javascript" src="./asciidoc.js"></script>\r
12<script type="text/javascript">\r
13/*<![CDATA[*/\r
14asciidoc.install();\r
15/*]]>*/\r
16</script>\r
17<link rel="stylesheet" href="./mlton.css" type="text/css">\r
18</head>\r
19<body class="article">\r
20<div id="banner">\r
21<div id="banner-home">\r
22<a href="./Home">MLton 20180207</a>\r
23</div>\r
24</div>\r
25<div id="header">\r
26<h1>ForeignFunctionInterface</h1>\r
27</div>\r
28<div id="content">\r
29<div id="preamble">\r
30<div class="sectionbody">\r
31<div class="paragraph"><p>MLton&#8217;s foreign function interface (FFI) extends Standard ML and makes\r
32it easy to take the address of C global objects, access C global\r
33variables, call from SML to C, and call from C to SML. MLton also\r
34provides <a href="MLNLFFI">ML-NLFFI</a>, which is a higher-level FFI for calling\r
35C functions and manipulating C data from SML.</p></div>\r
36</div>\r
37</div>\r
38<div class="sect1">\r
39<h2 id="_overview">Overview</h2>\r
40<div class="sectionbody">\r
41<div class="ulist"><ul>\r
42<li>\r
43<p>\r
44<a href="ForeignFunctionInterfaceTypes">Foreign Function Interface Types</a>\r
45</p>\r
46</li>\r
47<li>\r
48<p>\r
49<a href="ForeignFunctionInterfaceSyntax">Foreign Function Interface Syntax</a>\r
50</p>\r
51</li>\r
52</ul></div>\r
53</div>\r
54</div>\r
55<div class="sect1">\r
56<h2 id="_importing_code_into_sml">Importing Code into SML</h2>\r
57<div class="sectionbody">\r
58<div class="ulist"><ul>\r
59<li>\r
60<p>\r
61<a href="CallingFromSMLToC">Calling From SML To C</a>\r
62</p>\r
63</li>\r
64<li>\r
65<p>\r
66<a href="CallingFromSMLToCFunctionPointer">Calling From SML To C Function Pointer</a>\r
67</p>\r
68</li>\r
69</ul></div>\r
70</div>\r
71</div>\r
72<div class="sect1">\r
73<h2 id="_exporting_code_from_sml">Exporting Code from SML</h2>\r
74<div class="sectionbody">\r
75<div class="ulist"><ul>\r
76<li>\r
77<p>\r
78<a href="CallingFromCToSML">Calling From C To SML</a>\r
79</p>\r
80</li>\r
81</ul></div>\r
82</div>\r
83</div>\r
84<div class="sect1">\r
85<h2 id="_building_system_libraries">Building System Libraries</h2>\r
86<div class="sectionbody">\r
87<div class="ulist"><ul>\r
88<li>\r
89<p>\r
90<a href="LibrarySupport">Library Support</a>\r
91</p>\r
92</li>\r
93</ul></div>\r
94</div>\r
95</div>\r
96</div>\r
97<div id="footnotes"><hr></div>\r
98<div id="footer">\r
99<div id="footer-text">\r
100</div>\r
101<div id="footer-badges">\r
102</div>\r
103</div>\r
104</body>\r
105</html>\r