mirror of
https://git.linuxfromscratch.org/lfs.git
synced 2025-06-19 03:39:20 +01:00
chapter08: add rust-bindgen
This commit is contained in:
parent
f11dfd84f0
commit
2020a0a180
@ -64,6 +64,7 @@
|
|||||||
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="libffi.xml"/>
|
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="libffi.xml"/>
|
||||||
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="llvm.xml"/>
|
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="llvm.xml"/>
|
||||||
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="rustc.xml"/>
|
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="rustc.xml"/>
|
||||||
|
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="rust-bindgen.xml"/>
|
||||||
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="kmod.xml"/>
|
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="kmod.xml"/>
|
||||||
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="libelf.xml"/>
|
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="libelf.xml"/>
|
||||||
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="python.xml"/>
|
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="python.xml"/>
|
||||||
|
101
chapter08/rust-bindgen.xml
Normal file
101
chapter08/rust-bindgen.xml
Normal file
@ -0,0 +1,101 @@
|
|||||||
|
<?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;
|
||||||
|
]>
|
||||||
|
|
||||||
|
<sect1 id="ch-system-rust-bindgen" role="wrap">
|
||||||
|
<?dbhtml filename="rust-bindgen.html"?>
|
||||||
|
|
||||||
|
<sect1info condition="script">
|
||||||
|
<productname>rust-bindgen</productname>
|
||||||
|
<productnumber>&rust-bindgen-version;</productnumber>
|
||||||
|
<address>&rust-bindgen-url;</address>
|
||||||
|
</sect1info>
|
||||||
|
|
||||||
|
<title>Rust-bindgen-&rust-bindgen-version;</title>
|
||||||
|
|
||||||
|
<indexterm zone="ch-system-rust-bindgen">
|
||||||
|
<primary sortas="a-rust-bindgen">rust-bindgen</primary>
|
||||||
|
</indexterm>
|
||||||
|
|
||||||
|
<sect2 role="package">
|
||||||
|
<title/>
|
||||||
|
|
||||||
|
<para>Rust-bindgen automatically generates Rust FFI bindings to C and
|
||||||
|
C++ libraries.</para>
|
||||||
|
|
||||||
|
<segmentedlist>
|
||||||
|
<segtitle>&buildtime;</segtitle>
|
||||||
|
<segtitle>&diskspace;</segtitle>
|
||||||
|
|
||||||
|
<seglistitem>
|
||||||
|
<seg>&rust-bindgen-fin-sbu;</seg>
|
||||||
|
<seg>&rust-bindgen-fin-du;</seg>
|
||||||
|
</seglistitem>
|
||||||
|
</segmentedlist>
|
||||||
|
|
||||||
|
</sect2>
|
||||||
|
|
||||||
|
<sect2 role="installation">
|
||||||
|
<title>Installation of Rust-bindgen</title>
|
||||||
|
|
||||||
|
<para>Build rust-bindgen with:</para>
|
||||||
|
|
||||||
|
<screen><userinput remap="configure">cargo build --release</userinput></screen>
|
||||||
|
|
||||||
|
<variablelist>
|
||||||
|
<title>The meaning of the build option:</title>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><parameter>--release</parameter></term>
|
||||||
|
<listitem>
|
||||||
|
<para>Build this package with optimization suitable for stable
|
||||||
|
release. The default (<option>--debug</option>) will produce
|
||||||
|
unoptimized binary.</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
</variablelist>
|
||||||
|
|
||||||
|
<para>The testsuite needs <command>rustup</command> which is beyond the
|
||||||
|
scope of LFS.</para>
|
||||||
|
|
||||||
|
<para>Install the package:</para>
|
||||||
|
|
||||||
|
<screen><userinput remap="install">install -vm755 target/release/bindgen /usr/bin</userinput></screen>
|
||||||
|
|
||||||
|
</sect2>
|
||||||
|
|
||||||
|
<sect2 id="contents-rust-bindgen" role="content">
|
||||||
|
<title>Contents of Rust-bindgen</title>
|
||||||
|
|
||||||
|
<segmentedlist>
|
||||||
|
<segtitle>Installed programs</segtitle>
|
||||||
|
|
||||||
|
<seglistitem>
|
||||||
|
<seg>bindgen</seg>
|
||||||
|
</seglistitem>
|
||||||
|
</segmentedlist>
|
||||||
|
<variablelist>
|
||||||
|
<bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
||||||
|
<?dbfo list-presentation="list"?>
|
||||||
|
<?dbhtml list-presentation="table"?>
|
||||||
|
|
||||||
|
<varlistentry id="bindgen">
|
||||||
|
<term><command>bindgen</command></term>
|
||||||
|
<listitem>
|
||||||
|
<para>generates Rust bindings from C/C++ headers</para>
|
||||||
|
<indexterm zone="ch-system-rust-bindgen bindgen">
|
||||||
|
<primary sortas="b-bindgen">bindgen</primary>
|
||||||
|
</indexterm>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
</variablelist>
|
||||||
|
|
||||||
|
</sect2>
|
||||||
|
|
||||||
|
</sect1>
|
||||||
|
|
@ -646,6 +646,14 @@
|
|||||||
<!ENTITY rustc-final-sbu "21 SBU">
|
<!ENTITY rustc-final-sbu "21 SBU">
|
||||||
<!ENTITY rustc-final-du "10,000 MB">
|
<!ENTITY rustc-final-du "10,000 MB">
|
||||||
|
|
||||||
|
<!ENTITY rust-bindgen-version "0.60.1-lfs-1">
|
||||||
|
<!ENTITY rust-bindgen-size "7,524 KB">
|
||||||
|
<!ENTITY rust-bindgen-url "https://linuxfromscratch.org/~xry111/rust-bindgen/rust-bindgen-&rust-bindgen-version;.tar.xz">
|
||||||
|
<!ENTITY rust-bindgen-md5 "6ade6ad51b8a5463c29ada3ddc6f23f6">
|
||||||
|
<!ENTITY rust-bindgen-home "https://rust-lang.github.io/rust-bindgen/">
|
||||||
|
<!ENTITY rust-bindgen-fin-du "237 MB">
|
||||||
|
<!ENTITY rust-bindgen-fin-sbu "1.9 SBU">
|
||||||
|
|
||||||
<!ENTITY sed-version "4.8">
|
<!ENTITY sed-version "4.8">
|
||||||
<!ENTITY sed-size "1,317 KB">
|
<!ENTITY sed-size "1,317 KB">
|
||||||
<!ENTITY sed-url "&gnu;sed/sed-&sed-version;.tar.xz">
|
<!ENTITY sed-url "&gnu;sed/sed-&sed-version;.tar.xz">
|
||||||
|
Loading…
Reference in New Issue
Block a user