[ab4fdfc] | 1 | <?xml version="1.0" encoding="UTF-8"?>
|
---|
[05bcb18d] | 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 |
|
---|
[ce49f79e] | 7 | <!ENTITY cbindgen-download-http "https://github.com/mozilla/cbindgen/archive/v&cbindgen-version;/cbindgen-&cbindgen-version;.tar.gz">
|
---|
[df09c18] | 8 | <!ENTITY cbindgen-download-ftp " ">
|
---|
[c48815ad] | 9 | <!ENTITY cbindgen-md5sum "9349f81198b82c970822c452d08f25e5">
|
---|
| 10 | <!ENTITY cbindgen-size "224 KB">
|
---|
[8a65127] | 11 | <!ENTITY cbindgen-buildsize "121 MB (add 600 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 |
|
---|
[d4dc5bae] | 33 | &lfs122_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 |
|
---|
[afb71d0a] | 76 | &build-use-internet;
|
---|
| 77 |
|
---|
[05bcb18d] | 78 | </sect2>
|
---|
| 79 |
|
---|
| 80 | <sect2 role="installation">
|
---|
| 81 | <title>Installation of cbindgen</title>
|
---|
| 82 | <para>
|
---|
| 83 | Install <application>cbindgen</application> by running the following
|
---|
| 84 | commands:
|
---|
| 85 | </para>
|
---|
| 86 |
|
---|
| 87 | <screen><userinput>cargo build --release</userinput></screen>
|
---|
| 88 |
|
---|
| 89 | <para>
|
---|
[d271ed4] | 90 | To test the results, issue: <command>cargo test --release</command>.
|
---|
[c48815ad] | 91 | Three tests in <filename>profile.rs</filename> are known to fail
|
---|
| 92 | because they expect some Rust unstable features disabled in the BLFS
|
---|
| 93 | <xref linkend='rust'/> configuration.
|
---|
[05bcb18d] | 94 | </para>
|
---|
| 95 |
|
---|
| 96 | <para>
|
---|
| 97 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
| 98 | </para>
|
---|
| 99 |
|
---|
| 100 | <screen role="root"><userinput>install -Dm755 target/release/cbindgen /usr/bin/</userinput></screen>
|
---|
| 101 |
|
---|
| 102 | </sect2>
|
---|
| 103 |
|
---|
| 104 | <sect2 role="content">
|
---|
| 105 | <title>Contents</title>
|
---|
| 106 |
|
---|
| 107 | <segmentedlist>
|
---|
| 108 | <segtitle>Installed Program</segtitle>
|
---|
| 109 | <segtitle>Installed Library</segtitle>
|
---|
| 110 | <segtitle>Installed Directory</segtitle>
|
---|
| 111 |
|
---|
| 112 | <seglistitem>
|
---|
| 113 | <seg>
|
---|
| 114 | cbindgen
|
---|
| 115 | </seg>
|
---|
| 116 | <seg>
|
---|
[1575ce1] | 117 | none
|
---|
[05bcb18d] | 118 | </seg>
|
---|
| 119 | <seg>
|
---|
| 120 | none
|
---|
| 121 | </seg>
|
---|
| 122 | </seglistitem>
|
---|
| 123 | </segmentedlist>
|
---|
| 124 |
|
---|
| 125 | <variablelist>
|
---|
| 126 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 127 | <?dbfo list-presentation="list"?>
|
---|
| 128 | <?dbhtml list-presentation="table"?>
|
---|
| 129 |
|
---|
| 130 | <varlistentry id="cbindgen-prog">
|
---|
| 131 | <term><command>cbindgen</command></term>
|
---|
| 132 | <listitem>
|
---|
| 133 | <para>
|
---|
[4c24eb0a] | 134 | generates C bindings for <application>Rust</application> code
|
---|
[05bcb18d] | 135 | </para>
|
---|
| 136 | <indexterm zone="cbindgen cbindgen-prog">
|
---|
| 137 | <primary sortas="b-cbindgen">cbindgen</primary>
|
---|
| 138 | </indexterm>
|
---|
| 139 | </listitem>
|
---|
| 140 | </varlistentry>
|
---|
| 141 |
|
---|
| 142 | </variablelist>
|
---|
| 143 |
|
---|
| 144 | </sect2>
|
---|
| 145 |
|
---|
| 146 | </sect1>
|
---|