Git Product home page Git Product logo

gles31-sys's People

Contributors

avantgardnerio avatar nsaslavsky avatar vladasz avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

vladasz

gles31-sys's Issues

Simplify build, add Windows compatibility

Hi,

First of all, thanks for your crate. We've been using it in an Android library of ours for over a year now, and it helped us getting some custom video I/O to work.

I was wondering how you feel about simplifying the crate. Right now it needs a lot of machinery (build.rs logic, bindgen, NDK PATH setup) to basically produce the same file over and over again. In a fork of ours we replaced everything with a bat file we basically ran once on a developer machine:

bindgen ^
    ../../../../tooling/x86_64-pc-windows/ndk/android-ndk-r21d/sysroot/usr/include/GLES3/gl31.h ^
    --generate-block ^
    --no-layout-tests ^
    --no-prepend-enum-name ^
    --with-derive-eq ^
    --with-derive-default ^
    --with-derive-hash ^
    --with-derive-ord ^
    --use-array-pointers-in-arguments ^
    -o ../src/bindings.rs ^
    -- ^
    -I../../../../tooling/x86_64-pc-windows/ndk/android-ndk-r21d/sysroot/usr/include/

And our build.rs only contains

fn main() {
    println!("cargo:rustc-link-lib=GLESv3");
}

This gave a bindings.rs we checked in, dramatically sped up CI builds, and made the crate work on Windows.

My proposal would be to upstream these or similar (e.g., different scripts or parameters to call bindgen) changes into your crate. If multiple bindings files are needed (e.g., Android vs. iOS), I think it's still better to pre-generate them into various files and just select the right one at compilation.

Any thoughts?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.