Comments (8)
Is there a reason you are using go-webgpu in a xamarin app and not directly using wgpu-native
?
You can get .so of wgpu-native
from artifacts section of cd.yml github action.
go-webgpu
is just a wrapper library around wgpu-native
for exposing WebGPU API in Go.
from go-webgpu.
Oh you need android .so
of wgpu-native
for xamarin project, unfortunately I can't include them in this repo because it will unnecessarily increase the repo size (it's already around 400MB).
Though you should be able to build it locally using this script.
Or you can just fork this repo and change this line to copy .so
file instead of .a
, and run the action from your forked repo.
from go-webgpu.
Thank you, i will try. I have another question, why all your .a files very big, i see wgpu-native/releases all .dll and .so <10m, have different params when build?
from go-webgpu.
no special build flags it's just that static libs tend to be big, it's normal
from go-webgpu.
Hello, i use your Github Action compiled dynamic library , but get some error when use it in Xamarin.
When i load it by C# on android, throw DllNotFoundException,
[monodroid-assembly] Shared library 'libwgpunative.so' not loaded, p/invoke 'wgpuCreateInstance' may fail
I try use System.loadLibrary
of Java on android, show exception:
Java.Lang.UnsatisfiedLinkError:** 'dlopen failed: cannot locate symbol "ANativeWindow_setBuffersGeometry" referenced by "/data/app/com.companyname.WgpuAndroidApp-xtoQrCgMf64RV0nZ4m8B1w==/lib/x86_64/libwgpunative.so"...'
I Google it, find have a method to solve it, do you know it needs to have -lnativewindow added to its link command
what mean?
from go-webgpu.
[monodroid-assembly] Shared library 'libwgpunative.so' not loaded, p/invoke 'wgpuCreateInstance' may fail
it's wgpu-native
issue many functions listed in header files aren't actually implemented & exported, including wgpuCreateInstance
.
Java.Lang.UnsatisfiedLinkError:** 'dlopen failed: cannot locate symbol "ANativeWindow_setBuffersGeometry" referenced by "/data/app/com.companyname.WgpuAndroidApp-xtoQrCgMf64RV0nZ4m8B1w==/lib/x86_64/libwgpunative.so"...'
you probably need to load libandroid.so
before loading wgpu library
from go-webgpu.
I have try
Java.Lang.JavaSystem.LoadLibrary("android");
Java.Lang.JavaSystem.LoadLibrary("nativewindow");
but don't solve it, according xamarin/xamarin-android#6765 (comment), first i need to do it needs to have -lnativewindow added to its link command
, i search github only find set it in Android.mk, i don't know how to do it in this rust project.
from go-webgpu.
you can change this line like:
- export RUSTFLAGS="-L $PWD/tmp-lib"
+ export RUSTFLAGS="-L $PWD/tmp-lib -C link-args=-landroid"
also don't think you'd need to link libnativewindow.so
just libandroid.so
should be enough
from go-webgpu.
Related Issues (6)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go-webgpu.