[QUESTION]: Can .NET interactive be embedded in a Web Application? #2612
Replies: 13 comments 12 replies
|
Yes. There are a number of packages on NuGet and you can see an embedding example in this sample. |
|
We are working on exposing the tools to configure your aspnet host with .NET Interactive in PR #802 |
|
Thank you! |
|
@colombod aspnet host PR mentioned above seems to be merged now however there is no sample yet/blog/tutorial about it? |
Consuming .NET Interactive from a web page is not hard to begin but crafting a good experience takes time. We do not have yet documentation or tutorial for it but you can take a peak at a simple demo I have built here. That is not official sample and would love your feedback, maybe you could help building a simple demo? |
|
Thanks, I will try it. I can also guess that definitely there will be some blazor-flavour at some point. |
You can already use any other kernel for .NET Interactive. That app has the same engine as the VSCode, Jupiter, and Jupiterlab integration. You can access the sharp, fsharp, powershell and js languages. To have same functionality as the code spaces you might want to look at the nteract SDK to create your frontend. Wiring up Monaco editor could be complex but I would not be surprised if the nteract ecosystem already has a Monaco integration |
|
Is it feasible to make .NET interactive hostable within Blazor Webassembly so we could make .NET interactive sharing e.g. TorchSharp data science tutorials/examples available through Github Pages |
|
A WASM-based kernel is feasible and is something we plan to investigate. Try .NET uses WASM today, so we'll look into building one or more new subkernels that can produce and run WASM along similar lines. |
|
Is this linked in anyway to |
|
@jonsequitur any news on a WASM-based kernel (#800 (comment))? I've been using Pyodide kernel in Jupyterlite for a while now and it works great. It would be nice to be able to run C# or F# code entirely on the browser. |
|
I was working on sth like this: hosting Interactive on the Blazor app that runs F# code on a client browser, using my own mini-editor based on Monaco. F# kernel uses standard F# script engine (fsi) which is heavily Input-Output related (console logging, files etc), a lot of stuff that will not work on wasm or must be tailored/marked for that purpose. I asked the F# team to make the FSI lighter without any unnecessary computation tied to the environment. I expect it will not be a part of the .NET 9, though, but when I have time I will try to do my experiments Worth mentioning is also the fact, that with .NET 9 (tentative) wasm is going to support real multithreading :) |
|
Any update, embedded in Blazor in 2025? |
Uh oh!
There was an error while loading. Please reload this page.
Hi there,
Does this library be embedded in a web application developed in ASP.NET/Angular/React?
Thanks
All reactions