2018-10-22 22:16:01 +08:00
|
|
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
|
|
|
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
|
|
|
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
|
|
|
<!ENTITY % general-entities SYSTEM "../../general.ent">
|
|
|
|
%general-entities;
|
|
|
|
|
2018-10-25 07:03:55 +08:00
|
|
|
<!ENTITY cbindgen-download-http "https://github.com/eqrion/cbindgen/archive/v&cbindgen-version;/cbindgen-&cbindgen-version;.tar.gz">
|
|
|
|
<!ENTITY cbindgen-download-ftp " ">
|
2020-02-11 01:04:25 +08:00
|
|
|
<!ENTITY cbindgen-md5sum "5b13c2d2ba8465a940427d3fcafa8adb">
|
2020-02-01 01:02:16 +08:00
|
|
|
<!ENTITY cbindgen-size "160 KB">
|
|
|
|
<!ENTITY cbindgen-buildsize "92 MB (add 522 MB for tests)">
|
|
|
|
<!ENTITY cbindgen-time "1.1 SBU (Using parallelism=4; add 0.5 SBU for tests)">
|
2018-10-22 22:16:01 +08:00
|
|
|
]>
|
|
|
|
|
|
|
|
<sect1 id="cbindgen" xreflabel="Cbindgen-&cbindgen-version;">
|
|
|
|
<?dbhtml filename="cbindgen.html"?>
|
|
|
|
|
|
|
|
<sect1info>
|
|
|
|
<othername>$LastChangedBy$</othername>
|
|
|
|
<date>$Date$</date>
|
|
|
|
</sect1info>
|
|
|
|
|
|
|
|
<title>Cbindgen-&cbindgen-version;</title>
|
|
|
|
|
|
|
|
<indexterm zone="cbindgen">
|
|
|
|
<primary sortas="a-cbindgen">cbindgen</primary>
|
|
|
|
</indexterm>
|
|
|
|
|
|
|
|
<sect2 role="package">
|
|
|
|
<title>Introduction to Cbindgen</title>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
<application>Cbindgen</application> can be used to generate C bindings for
|
|
|
|
<application>Rust</application> code.
|
|
|
|
</para>
|
|
|
|
|
2020-02-17 07:50:16 +08:00
|
|
|
&lfs91_checked;
|
2018-10-22 22:16:01 +08:00
|
|
|
|
|
|
|
<bridgehead renderas="sect3">Package Information</bridgehead>
|
|
|
|
<itemizedlist spacing="compact">
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
Download (HTTP): <ulink url="&cbindgen-download-http;"/>
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
Download (FTP): <ulink url="&cbindgen-download-ftp;"/>
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
Download MD5 sum: &cbindgen-md5sum;
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
Download size: &cbindgen-size;
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
Estimated disk space required: &cbindgen-buildsize;
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
Estimated build time: &cbindgen-time;
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</itemizedlist>
|
2018-10-25 07:03:55 +08:00
|
|
|
<!--
|
2018-10-22 22:16:01 +08:00
|
|
|
<note>
|
|
|
|
<para>
|
|
|
|
The <application>cbindgen</application> source tarball shown above
|
|
|
|
downloads with the correct name, cbindgen-&cbindgen-version;.tar.gz,
|
|
|
|
if using a browser such as Firefox. If you prefer to use a command line
|
|
|
|
program such as wget, you normally would obtain
|
|
|
|
&cbindgen-version;.tar.gz. To obtain this package with the proper
|
|
|
|
filename, run:
|
|
|
|
|
|
|
|
<screen><userinput>wget -c https://github.com/eqrion/cbindgen/archive/v&cbindgen-version;.tar.gz \
|
|
|
|
-O cbindgen-&cbindgen-version;.tar.gz</userinput></screen>.
|
|
|
|
</para>
|
|
|
|
</note>
|
2018-10-25 07:03:55 +08:00
|
|
|
-->
|
2018-10-22 22:16:01 +08:00
|
|
|
<bridgehead renderas="sect3">cbindgen Dependencies</bridgehead>
|
|
|
|
|
|
|
|
<bridgehead renderas="sect4">Required</bridgehead>
|
|
|
|
<para role="required">
|
|
|
|
<xref linkend="rust"/>
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<para condition="html" role="usernotes">
|
|
|
|
User Notes: <ulink url="&blfs-wiki;/cbindgen"/>
|
|
|
|
</para>
|
|
|
|
</sect2>
|
|
|
|
|
|
|
|
<sect2 role="installation">
|
|
|
|
<title>Installation of cbindgen</title>
|
|
|
|
|
|
|
|
<note>
|
|
|
|
<para>
|
|
|
|
As with most <application>Rust</application> packages, this needs a
|
|
|
|
network connection to check the current versions of the required cargo
|
|
|
|
crates, and to download them if they are not already present.
|
|
|
|
</para>
|
|
|
|
</note>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
Install <application>cbindgen</application> by running the following
|
|
|
|
commands:
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<screen><userinput>cargo build --release</userinput></screen>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
To test the results, issue: <command>cargo test</command>.
|
2020-01-14 05:01:46 +08:00
|
|
|
Seven tests, test_expand* and test_dep_v2, are known to fail.
|
2018-10-22 22:16:01 +08:00
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
Now, as the <systemitem class="username">root</systemitem> user:
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<screen role="root"><userinput>install -Dm755 target/release/cbindgen /usr/bin/</userinput></screen>
|
|
|
|
|
|
|
|
</sect2>
|
|
|
|
|
|
|
|
<sect2 role="content">
|
|
|
|
<title>Contents</title>
|
|
|
|
|
|
|
|
<segmentedlist>
|
|
|
|
<segtitle>Installed Program</segtitle>
|
|
|
|
<segtitle>Installed Library</segtitle>
|
|
|
|
<segtitle>Installed Directory</segtitle>
|
|
|
|
|
|
|
|
<seglistitem>
|
|
|
|
<seg>
|
|
|
|
cbindgen
|
|
|
|
</seg>
|
|
|
|
<seg>
|
2019-01-16 10:04:36 +08:00
|
|
|
none
|
2018-10-22 22:16:01 +08:00
|
|
|
</seg>
|
|
|
|
<seg>
|
|
|
|
none
|
|
|
|
</seg>
|
|
|
|
</seglistitem>
|
|
|
|
</segmentedlist>
|
|
|
|
|
|
|
|
<variablelist>
|
|
|
|
<bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
|
|
|
<?dbfo list-presentation="list"?>
|
|
|
|
<?dbhtml list-presentation="table"?>
|
|
|
|
|
|
|
|
<varlistentry id="cbindgen-prog">
|
|
|
|
<term><command>cbindgen</command></term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
generates C bindings for <application>Rust</application> code.
|
|
|
|
</para>
|
|
|
|
<indexterm zone="cbindgen cbindgen-prog">
|
|
|
|
<primary sortas="b-cbindgen">cbindgen</primary>
|
|
|
|
</indexterm>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
</variablelist>
|
|
|
|
|
|
|
|
</sect2>
|
|
|
|
|
|
|
|
</sect1>
|