1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
5 | %general-entities;
|
---|
6 |
|
---|
7 | <!ENTITY cbindgen-download-http "https://github.com/eqrion/cbindgen/archive/v&cbindgen-version;/cbindgen-&cbindgen-version;.tar.gz">
|
---|
8 | <!ENTITY cbindgen-download-ftp " ">
|
---|
9 | <!ENTITY cbindgen-md5sum "59b31c737722e3becbac3c80c02bbeab">
|
---|
10 | <!ENTITY cbindgen-size "86 KB">
|
---|
11 | <!ENTITY cbindgen-buildsize "78 MB (add 300MB for the testsuite) ">
|
---|
12 | <!ENTITY cbindgen-time "1.2 SBU (on a 4 core machine, add 0.4 SBU for the testsuite)">
|
---|
13 | ]>
|
---|
14 |
|
---|
15 | <sect1 id="cbindgen" xreflabel="Cbindgen-&cbindgen-version;">
|
---|
16 | <?dbhtml filename="cbindgen.html"?>
|
---|
17 |
|
---|
18 | <sect1info>
|
---|
19 | <othername>$LastChangedBy$</othername>
|
---|
20 | <date>$Date$</date>
|
---|
21 | </sect1info>
|
---|
22 |
|
---|
23 | <title>Cbindgen-&cbindgen-version;</title>
|
---|
24 |
|
---|
25 | <indexterm zone="cbindgen">
|
---|
26 | <primary sortas="a-cbindgen">cbindgen</primary>
|
---|
27 | </indexterm>
|
---|
28 |
|
---|
29 | <sect2 role="package">
|
---|
30 | <title>Introduction to Cbindgen</title>
|
---|
31 |
|
---|
32 | <para>
|
---|
33 | <application>Cbindgen</application> can be used to generate C bindings for
|
---|
34 | <application>Rust</application> code.
|
---|
35 | </para>
|
---|
36 |
|
---|
37 | &lfs83_checked;
|
---|
38 |
|
---|
39 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
40 | <itemizedlist spacing="compact">
|
---|
41 | <listitem>
|
---|
42 | <para>
|
---|
43 | Download (HTTP): <ulink url="&cbindgen-download-http;"/>
|
---|
44 | </para>
|
---|
45 | </listitem>
|
---|
46 | <listitem>
|
---|
47 | <para>
|
---|
48 | Download (FTP): <ulink url="&cbindgen-download-ftp;"/>
|
---|
49 | </para>
|
---|
50 | </listitem>
|
---|
51 | <listitem>
|
---|
52 | <para>
|
---|
53 | Download MD5 sum: &cbindgen-md5sum;
|
---|
54 | </para>
|
---|
55 | </listitem>
|
---|
56 | <listitem>
|
---|
57 | <para>
|
---|
58 | Download size: &cbindgen-size;
|
---|
59 | </para>
|
---|
60 | </listitem>
|
---|
61 | <listitem>
|
---|
62 | <para>
|
---|
63 | Estimated disk space required: &cbindgen-buildsize;
|
---|
64 | </para>
|
---|
65 | </listitem>
|
---|
66 | <listitem>
|
---|
67 | <para>
|
---|
68 | Estimated build time: &cbindgen-time;
|
---|
69 | </para>
|
---|
70 | </listitem>
|
---|
71 | </itemizedlist>
|
---|
72 | <!--
|
---|
73 | <note>
|
---|
74 | <para>
|
---|
75 | The <application>cbindgen</application> source tarball shown above
|
---|
76 | downloads with the correct name, cbindgen-&cbindgen-version;.tar.gz,
|
---|
77 | if using a browser such as Firefox. If you prefer to use a command line
|
---|
78 | program such as wget, you normally would obtain
|
---|
79 | &cbindgen-version;.tar.gz. To obtain this package with the proper
|
---|
80 | filename, run:
|
---|
81 |
|
---|
82 | <screen><userinput>wget -c https://github.com/eqrion/cbindgen/archive/v&cbindgen-version;.tar.gz \
|
---|
83 | -O cbindgen-&cbindgen-version;.tar.gz</userinput></screen>.
|
---|
84 | </para>
|
---|
85 | </note>
|
---|
86 | -->
|
---|
87 | <bridgehead renderas="sect3">cbindgen Dependencies</bridgehead>
|
---|
88 |
|
---|
89 | <bridgehead renderas="sect4">Required</bridgehead>
|
---|
90 | <para role="required">
|
---|
91 | <xref linkend="rust"/>
|
---|
92 | </para>
|
---|
93 |
|
---|
94 | <para condition="html" role="usernotes">
|
---|
95 | User Notes: <ulink url="&blfs-wiki;/cbindgen"/>
|
---|
96 | </para>
|
---|
97 | </sect2>
|
---|
98 |
|
---|
99 | <sect2 role="installation">
|
---|
100 | <title>Installation of cbindgen</title>
|
---|
101 |
|
---|
102 | <note>
|
---|
103 | <para>
|
---|
104 | As with most <application>Rust</application> packages, this needs a
|
---|
105 | network connection to check the current versions of the required cargo
|
---|
106 | crates, and to download them if they are not already present.
|
---|
107 | </para>
|
---|
108 | </note>
|
---|
109 |
|
---|
110 | <para>
|
---|
111 | Install <application>cbindgen</application> by running the following
|
---|
112 | commands:
|
---|
113 | </para>
|
---|
114 |
|
---|
115 | <screen><userinput>cargo build --release</userinput></screen>
|
---|
116 |
|
---|
117 | <para>
|
---|
118 | To test the results, issue: <command>cargo test</command>.
|
---|
119 | </para>
|
---|
120 |
|
---|
121 | <para>
|
---|
122 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
123 | </para>
|
---|
124 |
|
---|
125 | <screen role="root"><userinput>install -Dm755 target/release/cbindgen /usr/bin/</userinput></screen>
|
---|
126 |
|
---|
127 | </sect2>
|
---|
128 |
|
---|
129 | <sect2 role="content">
|
---|
130 | <title>Contents</title>
|
---|
131 |
|
---|
132 | <segmentedlist>
|
---|
133 | <segtitle>Installed Program</segtitle>
|
---|
134 | <segtitle>Installed Library</segtitle>
|
---|
135 | <segtitle>Installed Directory</segtitle>
|
---|
136 |
|
---|
137 | <seglistitem>
|
---|
138 | <seg>
|
---|
139 | cbindgen
|
---|
140 | </seg>
|
---|
141 | <seg>
|
---|
142 | none.
|
---|
143 | </seg>
|
---|
144 | <seg>
|
---|
145 | none
|
---|
146 | </seg>
|
---|
147 | </seglistitem>
|
---|
148 | </segmentedlist>
|
---|
149 |
|
---|
150 | <variablelist>
|
---|
151 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
152 | <?dbfo list-presentation="list"?>
|
---|
153 | <?dbhtml list-presentation="table"?>
|
---|
154 |
|
---|
155 | <varlistentry id="cbindgen-prog">
|
---|
156 | <term><command>cbindgen</command></term>
|
---|
157 | <listitem>
|
---|
158 | <para>
|
---|
159 | generates C bindings for <application>Rust</application> code.
|
---|
160 | </para>
|
---|
161 | <indexterm zone="cbindgen cbindgen-prog">
|
---|
162 | <primary sortas="b-cbindgen">cbindgen</primary>
|
---|
163 | </indexterm>
|
---|
164 | </listitem>
|
---|
165 | </varlistentry>
|
---|
166 |
|
---|
167 | </variablelist>
|
---|
168 |
|
---|
169 | </sect2>
|
---|
170 |
|
---|
171 | </sect1>
|
---|