[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 " ">
|
---|
[eb1a6c7] | 9 | <!ENTITY cbindgen-md5sum "396f97c1d79ee5307611e7d586b4b011">
|
---|
| 10 | <!ENTITY cbindgen-size "188 KB">
|
---|
[bf5fb94] | 11 | <!ENTITY cbindgen-buildsize "122 MB (add 446 MB for tests)">
|
---|
| 12 | <!ENTITY cbindgen-time "0.8 SBU (add 0.5 SBU for tests)">
|
---|
[05bcb18d] | 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 |
|
---|
[193af65e] | 37 | &lfs10_checked;
|
---|
[05bcb18d] | 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>
|
---|
[798ed8e5] | 72 |
|
---|
[05bcb18d] | 73 | <bridgehead renderas="sect3">cbindgen Dependencies</bridgehead>
|
---|
| 74 |
|
---|
| 75 | <bridgehead renderas="sect4">Required</bridgehead>
|
---|
| 76 | <para role="required">
|
---|
| 77 | <xref linkend="rust"/>
|
---|
| 78 | </para>
|
---|
| 79 |
|
---|
| 80 | <para condition="html" role="usernotes">
|
---|
| 81 | User Notes: <ulink url="&blfs-wiki;/cbindgen"/>
|
---|
| 82 | </para>
|
---|
| 83 | </sect2>
|
---|
| 84 |
|
---|
| 85 | <sect2 role="installation">
|
---|
| 86 | <title>Installation of cbindgen</title>
|
---|
| 87 |
|
---|
| 88 | <note>
|
---|
| 89 | <para>
|
---|
| 90 | As with most <application>Rust</application> packages, this needs a
|
---|
| 91 | network connection to check the current versions of the required cargo
|
---|
| 92 | crates, and to download them if they are not already present.
|
---|
| 93 | </para>
|
---|
| 94 | </note>
|
---|
| 95 |
|
---|
| 96 | <para>
|
---|
| 97 | Install <application>cbindgen</application> by running the following
|
---|
| 98 | commands:
|
---|
| 99 | </para>
|
---|
| 100 |
|
---|
| 101 | <screen><userinput>cargo build --release</userinput></screen>
|
---|
| 102 |
|
---|
| 103 | <para>
|
---|
| 104 | To test the results, issue: <command>cargo test</command>.
|
---|
[798ed8e5] | 105 | Six tests, test_expand*, are known to fail.
|
---|
[05bcb18d] | 106 | </para>
|
---|
| 107 |
|
---|
| 108 | <para>
|
---|
| 109 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
| 110 | </para>
|
---|
| 111 |
|
---|
| 112 | <screen role="root"><userinput>install -Dm755 target/release/cbindgen /usr/bin/</userinput></screen>
|
---|
| 113 |
|
---|
| 114 | </sect2>
|
---|
| 115 |
|
---|
| 116 | <sect2 role="content">
|
---|
| 117 | <title>Contents</title>
|
---|
| 118 |
|
---|
| 119 | <segmentedlist>
|
---|
| 120 | <segtitle>Installed Program</segtitle>
|
---|
| 121 | <segtitle>Installed Library</segtitle>
|
---|
| 122 | <segtitle>Installed Directory</segtitle>
|
---|
| 123 |
|
---|
| 124 | <seglistitem>
|
---|
| 125 | <seg>
|
---|
| 126 | cbindgen
|
---|
| 127 | </seg>
|
---|
| 128 | <seg>
|
---|
[1575ce1] | 129 | none
|
---|
[05bcb18d] | 130 | </seg>
|
---|
| 131 | <seg>
|
---|
| 132 | none
|
---|
| 133 | </seg>
|
---|
| 134 | </seglistitem>
|
---|
| 135 | </segmentedlist>
|
---|
| 136 |
|
---|
| 137 | <variablelist>
|
---|
| 138 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 139 | <?dbfo list-presentation="list"?>
|
---|
| 140 | <?dbhtml list-presentation="table"?>
|
---|
| 141 |
|
---|
| 142 | <varlistentry id="cbindgen-prog">
|
---|
| 143 | <term><command>cbindgen</command></term>
|
---|
| 144 | <listitem>
|
---|
| 145 | <para>
|
---|
| 146 | generates C bindings for <application>Rust</application> code.
|
---|
| 147 | </para>
|
---|
| 148 | <indexterm zone="cbindgen cbindgen-prog">
|
---|
| 149 | <primary sortas="b-cbindgen">cbindgen</primary>
|
---|
| 150 | </indexterm>
|
---|
| 151 | </listitem>
|
---|
| 152 | </varlistentry>
|
---|
| 153 |
|
---|
| 154 | </variablelist>
|
---|
| 155 |
|
---|
| 156 | </sect2>
|
---|
| 157 |
|
---|
| 158 | </sect1>
|
---|