google / shaderc-rs

Rust bindings for the shaderc library.
https://docs.rs/shaderc
Apache License 2.0
259 stars 64 forks source link

Initial Android support #88

Closed enfipy closed 3 years ago

enfipy commented 4 years ago

Closes #87

I was able to run shaderc-rs on the Android app with dynamically linked shaderc that was built with the ndk-build tool inside build/shaderc/android_test folder with the following command:

ndk-build APP_BUILD_SCRIPT=Android.mk SPVTOOLS_LOCAL_PATH=../third_party/spirv-tools SPVHEADERS_LOCAL_PATH=../third_party/spirv-headers APP_STL:=c++_shared APP_ABI=all -j

Then I provide the path to the libs folder as SHADERC_LIB_DIR. I'm sure that this is not a good way to make it work but still - it works and I want to hear any feedback on how to make it right.

Also, there's still not possible to build it with the CARGO_FEATURE_BUILD_FROM_SOURCE and without PITA while building it with ndk-build by yourself. Should I add ndk-build to build.rs or there some way to do it with ninja?

google-cla[bot] commented 4 years ago

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

:memo: Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

googlebot commented 4 years ago

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

:memo: Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

antiagainst commented 4 years ago

Thanks for adding this!! Could you rebase first? The buildbots failure is fixed at top of the tree. I'll take a look later. :)