Browse Source

Merge pull request #69 from FenrirWolf/libctru-1.5.0

Update bindings for libctru 1.5.0
pull/10/head
FenrirWolf 7 years ago committed by GitHub
parent
commit
fed821e9ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      .travis.yml
  2. 38
      ctru-sys/bindgen.sh
  3. 4742
      ctru-sys/src/bindings.rs
  4. 1
      ctru-sys/src/lib.rs

7
.travis.yml

@ -16,16 +16,15 @@ install:
- export DEVKITPRO="/opt/devkitpro" - export DEVKITPRO="/opt/devkitpro"
- export DEVKITARM="$DEVKITPRO/devkitARM" - export DEVKITARM="$DEVKITPRO/devkitARM"
- export PATH="$PATH:$DEVKITARM/bin" - export PATH="$PATH:$DEVKITARM/bin"
- wget https://raw.githubusercontent.com/devkitPro/installer/master/perl/devkitARMupdate.pl - wget https://github.com/devkitPro/pacman/releases/download/v1.0.0/devkitpro-pacman.deb
- chmod +x devkitARMupdate.pl - sudo dpkg -i devkitpro-pacman.deb
- ./devkitARMupdate.pl "$DEVKITPRO" - sudo dkp-pacman -S --noconfirm devkitARM libctru
# Install Xargo # Install Xargo
- cargo install xargo - cargo install xargo
# Install Rust source # Install Rust source
- rustup component add rust-src - rustup component add rust-src
- popd - popd
script: script:

38
ctru-sys/bindgen.sh

@ -0,0 +1,38 @@
#!/usr/bin/env bash
clang_version=$1
if [ -z "$clang_version" ]; then
echo " usage: ./bindgen.sh <clang_version>"
echo "example: ./bindgen.sh 5.0.0"
echo "Check your current version with \`clang -v\`."
exit 1
fi
set -euxo pipefail
bindgen "$DEVKITPRO/libctru/include/3ds.h" \
--rust-target nightly \
--use-core \
--distrust-clang-mangling \
--no-doc-comments \
--no-layout-tests \
--ctypes-prefix "::libc" \
--no-prepend-enum-name \
--generate "functions,types,vars" \
--blacklist-type "u(8|16|32|64)" \
--blacklist-type "__builtin_va_list" \
--blacklist-type "__va_list" \
-- \
--target=arm-none-eabi \
--sysroot=$DEVKITARM/arm-none-eabi \
-isystem$DEVKITARM/arm-none-eabi/include \
-isystem/usr/lib/clang/$clang_version/include \
-I$DEVKITPRO/libctru/include \
-mfloat-abi=hard \
-march=armv6k \
-mtune=mpcore \
-mfpu=vfp \
-DARM11 \
-D_3DS \
> src/bindings.rs

4742
ctru-sys/src/bindings.rs

File diff suppressed because it is too large Load Diff

1
ctru-sys/src/lib.rs

@ -3,7 +3,6 @@
#![allow(non_snake_case)] #![allow(non_snake_case)]
#![feature(const_fn)] #![feature(const_fn)]
#![feature(untagged_unions)]
#![no_std] #![no_std]

Loading…
Cancel
Save