4 ms·
Portability, minimal size, and speed are all priorities. Building with Rust allowed us to really focus on all of these for both WebAssembly and OS binaries. Fo
by billti 3y ago
Portability, minimal size, and speed are all priorities. Building with Rust allowed us to really focus on all of these for both WebAssembly and OS binaries.
For example, if you go to the playground that we publish on every push to main (https://microsoft.github.io/qsharp/ https://microsoft.github.io/qsharp/), and open the Developer Tools to see the network traffic, you'll see that our WebAssembly module is just 1.5MB (504kb over the wire) - which includes the not just the language (parser, type system, IR, etc.) but also the runtime interpreter and quantum simulator.
Similarly, for the native tools, on my MacBook (i.e. ARM64) the command line compiler ("./target/release/qsc") is 3.9MB, which is entirely standalone with no dependencies.
We do have many features to add, so I'm sure those will grow a bit, but we are focused on keeping things as small, portable, and fast as a general principal.
- pjmlp 3y agoIn a way this seems to acknowledge Native AOT isn't ready and it was better to spend development effort for a full rewrite than collaborating with .NET team to improve the pain points.
- FrustratedMonky 3y agoRe-reading all the posts. I do come back to a basic question, or something I don't get. (and I haven't kept up with WASM, sorry). If Q# is a language for quantum computing, and it is a niche language just for exploring quantum computing. Then, how does that lead to a requirement to re-write to target WASM? If you are a person that would be doing quantum computing, why do you care if you can run it in a web browser, or VS code for the web. You would just install tooling on your own machine. Or if you are editing code in a web browser, the code itself would get compiled and run on server, why does it have to compile and run right there in a browser. So if we remove WebAssembly as a goal, Why can't you just use .NET, CLR and stick with current MS languages to build it in? I don't understand why running in the web is a needed feature for this set of users. I understand RUST is very speedy. Is that the real goal, and all of "Rust also works on WASM", is just a side benefit? Seems like quantum computing needs speed. Performance is the real goal. To simulate a quantum computer a normal computer must run many more steps. So we have performance of : .NET, Rust binary, or Rust to WASM. Guess, maybe I answered my own question. If Rust is faster then .NET, then that is goal, and Rust can also run on WASM as option is a side benefit. I'm afraid this seems to be more indictment of .NET in general, not just F#.