Add support for webassembly
See original GitHub issueWhen trying to run on webassembly I get the following exception:
Unhandled exception rendering component: Operation is not supported on this platform.
System.PlatformNotSupportedException: Operation is not supported on this platform.
at System.Threading.Thread.Start()
at TextMateSharp.Model.TMModel.TokenizerThread.Run() in /_/src/TextMateSharp/Model/TMModel.cs:line 63
at TextMateSharp.Model.TMModel.Start() in /_/src/TextMateSharp/Model/TMModel.cs:line 334
at TextMateSharp.Model.TMModel.SetGrammar(IGrammar grammar) in /_/src/TextMateSharp/Model/TMModel.cs:line 282
at AvaloniaEdit.TextMate.TextMateColoringTransformer.SetGrammar(IGrammar grammar)
at AvaloniaEdit.TextMate.TextMate.Installation.SetGrammar(String scopeName)
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
WebAssembly | Can I use... Support tables for HTML5 ...
"Can I use" provides up-to-date browser support tables for support of front-end web technologies on desktop and mobile web browsers.
Read more >Support for WebAssembly (Wasm)
Run flutter build web --wasm. To build a web application with Wasm, add a --wasm flag to the existing flutter build web command....
Read more >How to Add WebAssembly Support to a General-Purpose ...
Adding Support for WebAssembly · Avoid Performing I/O Directly · Add wasm-bindgen as a Dependency · Avoid Synchronous I/O · Avoid Spawning Threads....
Read more >WebAssembly
WebAssembly is designed to maintain the versionless, feature-tested, and backwards-compatible nature of the web. WebAssembly modules will be able to call into ...
Read more >WebAssembly Language Support Matrix
This guide tracks support for compiling a language to WebAssembly. It is organized into three sections: Support for the top 20 languages, ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
If you enable that msbuild setting then it sets up some machinery to use web workers for running additional ‘threads’.
The first problem with this with Avalonia is that you need WASM builds of SkiaSharp and HarfBuzz that have been built with some extra threading options, and it looks like that’s still only available in the preview builds. (https://github.com/mono/SkiaSharp/issues/2285)
I just gave it a go with a build that I changed to use the preview Skia build, and it build and ran (my top level UI displays in the browser, and the browser dev tools show the workers being present), but then it hit other problems before getting to the AvaloniaEdit parts… I’ll try to test it with a more minimal test later
Does .net7 support threads by default in wasm? or not yet?