Speckle-Sharp WebAssembly

Hey all,

Just a general question if anyone has attempted to use Speckle-Sharp within WebAssembly?

I have tried to get together a little Blazor-based wasm example together and run into an issue where when I go to create the Speckle Client I get the exception: “System.Net.Requests is not supported on this platform.”

Is it possible to overwrite the used HttpClient with a different one?

Thanks all

Hey @sanchez - first one to ask us this question! Haven’t really tried it out, and we don’t have any experience (maybe @adamhathcock in a past life?).

I’ve recently starred GitHub - EmilPoulsen/Hackuble: A hackable C# based scripting environment for 3D modeling running in the web browser. from emil poulsen (can’t find him on the fourm), maybe you can poke him over on github?

Hi,

I’ve definitely used Blazor in the past and our V3 version should work better though still needs a little work to do WASM http requests though server should work fine.

I’m more worried if the JSON serialization works in WASM as reflection is limited! Let me know your use case as I’m interested!

Adam

Hi Adam,

At the moment I am just interested in seeing how far I can push it, finding the limit and then unlocking the potential from there. Ideally I was hoping to make Speckle Applications that can read+write Speckle Models within WASM.

I switched to use version “3.1.0-dev.182” and managed to be able to fetch the user profile picture! I am yet to keep testing what else is possible however I have noticed these warnings appearing in my build logs:

Is it possible to disable the sqlite3 functionality within SpeckleSharp?

It currently is not possible to disable SQLite caching or anything else Blazor might need as it’s currently not a target for us.

If you want to grab the source and give it a whirl yourself, please do. Speckle.SDK is the new repo for the new source and actively developed.

1 Like

no worries, thanks for the prompt response Adam

1 Like