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