dotnet / try

Try .NET provides developers and content authors with tools to create interactive experiences.
MIT License
2.87k stars 520 forks source link

Provide documentation for using wasm "mode" #382

Open damageboy opened 5 years ago

damageboy commented 5 years ago

Hi, It's pretty clear that https://dotnet.microsoft.com/platform/try-dotnet is using something different than the global dotnet-try tool. When I load up the chrome developer tools I clearly see that somehow, magically, mono.wasm is being used: image

At the same time, the dotnet-try global tool seems to work very differently: image

and there seems to be no mono.wasm being loaded/ used.

I'd like for some guidance / documentation to be provided on how to get a mono.wasm / blazor enabled so I can host runnable documentation in a static web-site without needing to use server side resources...

I'm working on a blog series and would love to host some runnable docs / code and provide them to people reading the posts and wanting to play with the code. I don't mind going through less-than ready code or instructions, but it would be great if at the very least so pointers to how to get this obviously working feature of dotnet-try off the ground!

rchande commented 4 years ago

@damageboy It's not quite purely "static". True, the wasm dependencies are served in a static manner, but we still compile the user's code serverside. The basic flow is:

All the parts you need to implement the above are available in dotnet-try if you want to host your own service.

damageboy commented 4 years ago

@rchande Thanks for the explanation!

rchande commented 4 years ago

@damageboy Let me know if you're interested in exploring that avenue, I can probably provide some guidance.

damageboy commented 4 years ago

I’m definitely interested and I’ve actually tried to do it on my own to some extent....

Maybe I was too optimistic but I tried to compile and run the MLS.Blazor project on the next after upgrading to preview9...

So far I couldn’t get anything off the ground.

So help will surely push me a long ways forward...

On Thu, 12 Sep 2019 at 19:12 Ravi Chande notifications@github.com wrote:

@damageboy https://github.com/damageboy Let me know if you're interested in exploring that avenue, I can probably provide some guidance.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/dotnet/try/issues/382?email_source=notifications&email_token=AAA6WIUVWFL6TRSIOMU25ETQJJS7PA5CNFSM4IMZ33X2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6SNTWQ#issuecomment-530897370, or mute the thread https://github.com/notifications/unsubscribe-auth/AAA6WIQLFZXCOFKOG5QHVOLQJJS7PANCNFSM4IMZ33XQ .

--

Shechter.
rchande commented 4 years ago

There were actually some breaking changes between Preview 8 and Preview 9--our builds still depend on Preview 8.

damageboy commented 4 years ago

OK, Is there anything else I should be aware of? Is MLB.Blazor a single project that constitutes a running example that should be useful? I just took the only thing with Blazor in its name assuming it's the wasm code generator and it might be my entry point.