Problems occur when i try to compile an avalonia app to wasm #19568
-
Words between "(" and ")" is written by me, refers to the English of these Chinese words. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
|
Have you installed wasm-tools workloads? See https://docs.avaloniaui.net/docs/guides/platforms/how-to-use-web-assembly |
Beta Was this translation helpful? Give feedback.
The log has things like
lto.tmp: undefined symbol: gr_backendrendertarget_new_direct3d, etc which shouldn't make their way into a WASM build. Are you trying to use SkiaSharp 3? If so, have you explicitly included theSkiaSharp.NativeAssets.WebAssemblyfor the specific version?WASM as an afterthought to an already made project is a bad idea, IMO. They're very tricky and have poor debugging information coupled with things that silently break. So you should always start out with a WASM project and work to keep it compatible since you can track regressions across version history.