mono-wasm | concept aiming at building C | Binary Executable Format library
kandi X-RAY | mono-wasm Summary
kandi X-RAY | mono-wasm Summary
This project is a proof-of-concept aiming at building C# applications into WebAssembly, by using Mono and compiling/linking everything statically into one .wasm file that can be easily delivered to browsers. The process does not use Emscripten (or Binaryen) but instead uses the experimental WebAssembly backend of LLVM with clang and lld to generate the final .wasm code. The goal is to use as few dependencies as possible. At the moment the only dependencies are LLVM, clang and lld trunk. mono-wasm supports 2 build modes: one that links all the LLVM bitcode into one module then performs a WebAssembly codegen on it, and one that compiles project dependencies into WebAssembly incrementally (the runtime and the mscorlib assembly) then uses lld to link into a final .wasm file. The later is experimental but will become the default as it allows build times lesser than a second. The .wasm file is loaded from JavaScript (see index.js), which also exposes proper callbacks for system calls that the C library will be calling into. These syscalls are responsible for heap management, I/O, etc. This project is a work in progress. Feel free to ping me if you have questions or feedback: laurent.sansonetti@microsoft.com.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of mono-wasm
mono-wasm Key Features
mono-wasm Examples and Code Snippets
Community Discussions
Trending Discussions on mono-wasm
QUESTION
I have tried adding ServiceStack-references to a client-side Blazor project, but I run into problems after adding ServiceStack.HttpClient via NuGet.
Currently, VS2019 will tell me that:
Cannot find declaration of exported type 'System.Threading'
and when ask/look around, they say that:
Blazor is built using mono-wasm as the base .NET framework implementation, and in this case I believe it's a missing method in mono-wasm that's the issue.
and
at present Mono WASM has no support for threading; check the repo https://github.com/lrz/mono-wasm-mono for more info
Am I getting it correctly:
- ServiceStack requires
System.Threading
- WebAssembly and thus Blazor does not support references to
System.Threading
- Meaning that ServiceStack cannot be used in a Blazor app
ANSWER
Answered 2019-May-31 at 00:12@Ted,
Blazor does not run in a multi-thread environment. Blazor (mono-wasm) runs in the same sandbox of JavaScript, in the same UI thread. No multi-threading, no concurrent or parallel programming. As I've said before, I've never heard of ServiceStack, but I guess that ServiceStack.HttpClient cannot be used in Blazor client side, as "Blazor HttpClient" is based on HttpMessageHandler, and it is adapted to work as an Ajax agent; that is, HttpClient communicate with the Back End via the JavaScript Fetch Web API, whereas ServiceStack, I believe, perform the traditional http client calls, employing Web Sockets, which is not supported in Blazor (mono-wasm). In Asp.Net Core 5.0 it is expected that Blazor client side would support Web Sockets, after mono would be replaced.
No, the ServiceStack cannot be used in a Blazor app
Hope this helps...
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install mono-wasm
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page