source: general/prog/cbindgen.xml

trunk
Last change on this file was d271ed4, checked in by Xi Ruoyao <xry111@…>, 5 weeks ago

cbindgen: Add --release to cargo test

So cargo test won't rebuild a debug version of the executable and run
the test suite with it.

  • Property mode set to 100644
File size: 3.8 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
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
7 <!ENTITY cbindgen-download-http "https://github.com/mozilla/cbindgen/archive/v&cbindgen-version;/cbindgen-&cbindgen-version;.tar.gz">
8 <!ENTITY cbindgen-download-ftp " ">
9 <!ENTITY cbindgen-md5sum "f3ef70691bc4743b8f76ca6d27847ba4">
10 <!ENTITY cbindgen-size "216 KB">
11 <!ENTITY cbindgen-buildsize "121 MB (add 600 MB for tests)">
12 <!ENTITY cbindgen-time "0.5 SBU (add 0.4 SBU for tests), both on a 4-core machine">
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
33 &lfs121_checked;
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>
68
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
76 &build-use-internet;
77
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>
90 To test the results, issue: <command>cargo test --release</command>.
91 Three tests in <filename>profile.rs</filename> are known to fail.
92 </para>
93
94 <para>
95 Now, as the <systemitem class="username">root</systemitem> user:
96 </para>
97
98<screen role="root"><userinput>install -Dm755 target/release/cbindgen /usr/bin/</userinput></screen>
99
100 </sect2>
101
102 <sect2 role="content">
103 <title>Contents</title>
104
105 <segmentedlist>
106 <segtitle>Installed Program</segtitle>
107 <segtitle>Installed Library</segtitle>
108 <segtitle>Installed Directory</segtitle>
109
110 <seglistitem>
111 <seg>
112 cbindgen
113 </seg>
114 <seg>
115 none
116 </seg>
117 <seg>
118 none
119 </seg>
120 </seglistitem>
121 </segmentedlist>
122
123 <variablelist>
124 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
125 <?dbfo list-presentation="list"?>
126 <?dbhtml list-presentation="table"?>
127
128 <varlistentry id="cbindgen-prog">
129 <term><command>cbindgen</command></term>
130 <listitem>
131 <para>
132 generates C bindings for <application>Rust</application> code
133 </para>
134 <indexterm zone="cbindgen cbindgen-prog">
135 <primary sortas="b-cbindgen">cbindgen</primary>
136 </indexterm>
137 </listitem>
138 </varlistentry>
139
140 </variablelist>
141
142 </sect2>
143
144</sect1>
Note: See TracBrowser for help on using the repository browser.