[QUESTION]: Can .NET interactive be embedded in a Web Application? #2612
Replies: 12 comments 11 replies
-
Yes. There are a number of packages on NuGet and you can see an embedding example in this sample. |
Beta Was this translation helpful? Give feedback.
-
We are working on exposing the tools to configure your aspnet host with .NET Interactive in PR #802 |
Beta Was this translation helpful? Give feedback.
-
Thank you! |
Beta Was this translation helpful? Give feedback.
-
@colombod aspnet host PR mentioned above seems to be merged now however there is no sample yet/blog/tutorial about it? |
Beta Was this translation helpful? Give feedback.
-
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? |
Beta Was this translation helpful? Give feedback.
-
Thanks, I will try it. I can also guess that definitely there will be some blazor-flavour at some point. |
Beta Was this translation helpful? Give feedback.
-
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 |
Beta Was this translation helpful? Give feedback.
-
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 |
Beta Was this translation helpful? Give feedback.
-
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. |
Beta Was this translation helpful? Give feedback.
-
Is this linked in anyway to |
Beta Was this translation helpful? Give feedback.
-
@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. |
Beta Was this translation helpful? Give feedback.
-
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 :) |
Beta Was this translation helpful? Give feedback.
-
Hi there,
Does this library be embedded in a web application developed in ASP.NET/Angular/React?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions