[05bcb18d] | 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 |
|
---|
[df09c18] | 7 | <!ENTITY cbindgen-download-http "https://github.com/eqrion/cbindgen/archive/v&cbindgen-version;/cbindgen-&cbindgen-version;.tar.gz">
|
---|
| 8 | <!ENTITY cbindgen-download-ftp " ">
|
---|
[c190b38] | 9 | <!ENTITY cbindgen-md5sum "6aa2991ca8411f9ebf9961e8b873e884">
|
---|
[8fcb69a] | 10 | <!ENTITY cbindgen-size "204 KB">
|
---|
| 11 | <!ENTITY cbindgen-buildsize "121 MB (add 596 MB for tests)">
|
---|
[ea41a4ef] | 12 | <!ENTITY cbindgen-time "0.5 SBU (add 0.4 SBU for tests), both on a 4-core machine">
|
---|
[05bcb18d] | 13 | ]>
|
---|
| 14 |
|
---|
| 15 | <sect1 id="cbindgen" xreflabel="Cbindgen-&cbindgen-version;">
|
---|
| 16 | <?dbhtml filename="cbindgen.html"?>
|
---|
| 17 |
|
---|
| 18 |
|
---|
| 19 | <title>Cbindgen-&cbindgen-version;</title>
|
---|
| 20 |
|
---|
| 21 | <indexterm zone="cbindgen">
|
---|
| 22 | <primary sortas="a-cbindgen">cbindgen</primary>
|
---|
| 23 | </indexterm>
|
---|
| 24 |
|
---|
| 25 | <sect2 role="package">
|
---|
| 26 | <title>Introduction to Cbindgen</title>
|
---|
| 27 |
|
---|
| 28 | <para>
|
---|
| 29 | <application>Cbindgen</application> can be used to generate C bindings for
|
---|
| 30 | <application>Rust</application> code.
|
---|
| 31 | </para>
|
---|
| 32 |
|
---|
[b984aaa1] | 33 | &lfs112_checked;
|
---|
[05bcb18d] | 34 |
|
---|
| 35 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
| 36 | <itemizedlist spacing="compact">
|
---|
| 37 | <listitem>
|
---|
| 38 | <para>
|
---|
| 39 | Download (HTTP): <ulink url="&cbindgen-download-http;"/>
|
---|
| 40 | </para>
|
---|
| 41 | </listitem>
|
---|
| 42 | <listitem>
|
---|
| 43 | <para>
|
---|
| 44 | Download (FTP): <ulink url="&cbindgen-download-ftp;"/>
|
---|
| 45 | </para>
|
---|
| 46 | </listitem>
|
---|
| 47 | <listitem>
|
---|
| 48 | <para>
|
---|
| 49 | Download MD5 sum: &cbindgen-md5sum;
|
---|
| 50 | </para>
|
---|
| 51 | </listitem>
|
---|
| 52 | <listitem>
|
---|
| 53 | <para>
|
---|
| 54 | Download size: &cbindgen-size;
|
---|
| 55 | </para>
|
---|
| 56 | </listitem>
|
---|
| 57 | <listitem>
|
---|
| 58 | <para>
|
---|
| 59 | Estimated disk space required: &cbindgen-buildsize;
|
---|
| 60 | </para>
|
---|
| 61 | </listitem>
|
---|
| 62 | <listitem>
|
---|
| 63 | <para>
|
---|
| 64 | Estimated build time: &cbindgen-time;
|
---|
| 65 | </para>
|
---|
| 66 | </listitem>
|
---|
| 67 | </itemizedlist>
|
---|
[798ed8e5] | 68 |
|
---|
[05bcb18d] | 69 | <bridgehead renderas="sect3">cbindgen Dependencies</bridgehead>
|
---|
| 70 |
|
---|
| 71 | <bridgehead renderas="sect4">Required</bridgehead>
|
---|
| 72 | <para role="required">
|
---|
| 73 | <xref linkend="rust"/>
|
---|
| 74 | </para>
|
---|
| 75 |
|
---|
| 76 | <para condition="html" role="usernotes">
|
---|
| 77 | User Notes: <ulink url="&blfs-wiki;/cbindgen"/>
|
---|
| 78 | </para>
|
---|
| 79 | </sect2>
|
---|
| 80 |
|
---|
| 81 | <sect2 role="installation">
|
---|
| 82 | <title>Installation of cbindgen</title>
|
---|
| 83 |
|
---|
| 84 | <note>
|
---|
| 85 | <para>
|
---|
| 86 | As with most <application>Rust</application> packages, this needs a
|
---|
| 87 | network connection to check the current versions of the required cargo
|
---|
| 88 | crates, and to download them if they are not already present.
|
---|
| 89 | </para>
|
---|
| 90 | </note>
|
---|
| 91 |
|
---|
| 92 | <para>
|
---|
| 93 | Install <application>cbindgen</application> by running the following
|
---|
| 94 | commands:
|
---|
| 95 | </para>
|
---|
| 96 |
|
---|
| 97 | <screen><userinput>cargo build --release</userinput></screen>
|
---|
| 98 |
|
---|
| 99 | <para>
|
---|
[a9b40fd] | 100 | <!-- 0.16.0 log shows 2 suites where both tests pass, in the third
|
---|
| 101 | 3 of 6 fail. The suite names are impenetrable. -->
|
---|
[05bcb18d] | 102 | To test the results, issue: <command>cargo test</command>.
|
---|
[a9b40fd] | 103 | Three tests in the final suite are known to fail.
|
---|
[05bcb18d] | 104 | </para>
|
---|
| 105 |
|
---|
| 106 | <para>
|
---|
| 107 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
| 108 | </para>
|
---|
| 109 |
|
---|
| 110 | <screen role="root"><userinput>install -Dm755 target/release/cbindgen /usr/bin/</userinput></screen>
|
---|
| 111 |
|
---|
| 112 | </sect2>
|
---|
| 113 |
|
---|
| 114 | <sect2 role="content">
|
---|
| 115 | <title>Contents</title>
|
---|
| 116 |
|
---|
| 117 | <segmentedlist>
|
---|
| 118 | <segtitle>Installed Program</segtitle>
|
---|
| 119 | <segtitle>Installed Library</segtitle>
|
---|
| 120 | <segtitle>Installed Directory</segtitle>
|
---|
| 121 |
|
---|
| 122 | <seglistitem>
|
---|
| 123 | <seg>
|
---|
| 124 | cbindgen
|
---|
| 125 | </seg>
|
---|
| 126 | <seg>
|
---|
[1575ce1] | 127 | none
|
---|
[05bcb18d] | 128 | </seg>
|
---|
| 129 | <seg>
|
---|
| 130 | none
|
---|
| 131 | </seg>
|
---|
| 132 | </seglistitem>
|
---|
| 133 | </segmentedlist>
|
---|
| 134 |
|
---|
| 135 | <variablelist>
|
---|
| 136 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 137 | <?dbfo list-presentation="list"?>
|
---|
| 138 | <?dbhtml list-presentation="table"?>
|
---|
| 139 |
|
---|
| 140 | <varlistentry id="cbindgen-prog">
|
---|
| 141 | <term><command>cbindgen</command></term>
|
---|
| 142 | <listitem>
|
---|
| 143 | <para>
|
---|
[4c24eb0a] | 144 | generates C bindings for <application>Rust</application> code
|
---|
[05bcb18d] | 145 | </para>
|
---|
| 146 | <indexterm zone="cbindgen cbindgen-prog">
|
---|
| 147 | <primary sortas="b-cbindgen">cbindgen</primary>
|
---|
| 148 | </indexterm>
|
---|
| 149 | </listitem>
|
---|
| 150 | </varlistentry>
|
---|
| 151 |
|
---|
| 152 | </variablelist>
|
---|
| 153 |
|
---|
| 154 | </sect2>
|
---|
| 155 |
|
---|
| 156 | </sect1>
|
---|