Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add support for webassembly

See original GitHub issue

When 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:closed
  • Created 2 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

Numpsycommented, Mar 30, 2023

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. (

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

danipencommented, Mar 30, 2023

Does .net7 support threads by default in wasm? or not yet?

Read more comments on GitHub >

github_iconTop 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 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found