blob: 120bc3e8d05a79ab059996650efa609cbb32f190 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
. "${GRIMOIRE}/FUNCTIONS"
SPELL="cbindgen"
if [[ "${CBINDGEN_BRANCH}" == "scm" ]]; then
VERSION="$(get_scm_version)"
SOURCE="${SPELL}-git.tar.bz2"
SOURCE_DIRECTORY="${BUILD_DIRECTORY}/${SPELL}-git"
SOURCE_URL="git://github.com/egrion/${SPELL}:${SPELL}-git"
SOURCE_IGNORE="volatile"
FORCE_DOWNLOAD="on"
else
VERSION="0.9.1"
SOURCE_HASH="sha512:1f8148b2e1cbb580fd0ef9f178001851e513de39af6c69507119446dd2edc94af6438a13c87a70afa013612fb7964cf8e351b7f18e7d3732a474a7b8166d3fa8"
SOURCE="${SPELL}-${VERSION}.tar.gz"
SOURCE_URL[0]="https://github.com/eqrion/${SPELL}/archive/v${VERSION}.tar.gz"
SOURCE_DIRECTORY="${BUILD_DIRECTORY}/${SPELL}-${VERSION}"
fi
WEB_SITE="https://docs.rs/cbindgen"
LICENSE[0]="MPL"
ENTERED="20181022"
SHORT="a tool to generate C bindings for Rust code"
cat << EOF
This project can be used to generate C bindings for Rust code. It is currently
being developed to support creating bindings for WebRender, but has been
designed to support any project.
Features
* Builds bindings for a crate, its mods, its dependent crates, and their mods
* Only the necessary types for exposed functions are given bindings
* Can specify annotations for controlling some aspects of binding
* Support for generic structs and unions
* Support for exporting constants and statics
* Customizable formatting, can be used in C or C++ projects
* Support for generating `#ifdef`'s for `#[cfg]` attributes
* Support for `#[repr(sized)]` tagged enum's
EOF
|