Polywrap .NET client proposal

OVERVIEW

A Polywrap .NET C# client will expand the project market, reaching: gaming industry, mobile, IOT, robotics, asp.net web and all sizes enterprises; .NET C# is also one of the most used languages worldwide.

ABOUT ME

I’m Marco Negroni, Senior .NET and Web3 full stack developer, Tech researcher; I have about 10 years of professional experience, I’m also a member of dOrg, for more information about me and my experience please check my resume.

My resume: CV_MARCO_NEGRONI.pdf - Google Drive

Linkedin: https://www.linkedin.com/in/lordmarkdev/

SPECIFICATIONS

Since the goal of Polywrap is to be cross-platform, makes sense to develop the .NET client using C# language and .NET Standard 2.0 as framework.

Building it as .NET Standard 2.0 library allows the client to be referenced and executed on basically any kind of architecture (x86, x64, arm, etc…), covering any operating system (Linux, Mac, IOS, Android, Windows).

.NET Standard 2.0 can be referenced by the latest versions of: .NET Core, .NET 5, .NET 6, Xamarin.IOS, Xamarin.Android, Xamarin.Mac, Mono, UWP and Unity; making it completely cross-platform with one single code base.

For more information: .NET Standard | Microsoft Docs

There is no official support to execute WASM by Microsoft, but there are several open source libraries that allows that, for example:

basically all uses an external runtime (wrapped C WASM runtime) to be imported/referenced, but not this one: GitHub - RyanLamansky/dotnet-webassembly: Create, read, modify, write and execute WebAssembly (WASM) files from .NET-based applications.

it allows to create, read, modify, write and execute a WASM from 100% managed .NET code, is more portable, giving access to clear .NET sources; it is also maintained and up to date (basically converts WASM assembly to IL that then is JIT compiled and executed).

So I think that it is better to evaluate dotnet-webassembly first.

Other solid libraries will be also used for the development of Polywrap Core and Client.

DEMO

I already made a very simple demo to test the chosen architecture and main libraries; i made a WASM in AssemblyScript that does a simple sum of two integer calling the “add” function, then i made a .NET Standard 2.0 library that executes the WASM getting the return of the function and i referenced/executed it from:

  • .NET Framework 4.8 x64 console application
  • Unity 3D project, moving a cube by the result of the WASM function, from Windows and Android.

You can check sources here: GitHub - LordMarkDev/WASMTest

ESTIMATES

RATE: 170$/h
1 SP: 10 hours
AVAILABILITY: about 25/hours per week
ETA: november end / december mid
WALLET: 0x0fF5DD837070C1bB1199F5c8A9d60148e2B05F26

COMPONENT STORY SP
CORE TYPES 6
CORE ALGORITHMS 2
CORE ARCHITECTURE AND GENERIC STUFF 1
CLIENT WASM 5
CLIENT SUPPORT FOR MOST COMMON SYSTEM CALLS (LIKE NETWORK) 4
CLIENT ARCHITECTURE AND GENERIC STUFF 6
UNIT TESTING 6
TOTAL 30 (51000 USDC)

TERMS

By submitting this proposal, I understand that the DAO and my sponsor will be evaluating whether my work meets the acceptance criteria. If it does not, the DAO will determine what percentage of the proposal cost to pay, if any.

I also understand that I may not begin work until it is confirmed that the Snapshot proposal has passed.

[ X ] I agree

1 Like

I’ve spoken with @LordMarkDev twice regarding this work, and think he has the right technical experience and understanding of Polywrap to pull this off well. For me the biggest question here would be priority / timing. Do we want to wait until we have a Rust client so we can consolidate duplicate code into native DLLs that are reused? Or is this a future optimization we can make once the .NET client is built.

Also it’s worth noting that we’ve received a lot of asks about using Polywrap within Unity (Game Engine w/ C# scripting), so I think the potential users of this client are already there and waiting.

I think that Polywrap .NET client has a great potential, but i need to know if the DAO want to procede because i’m organizing my time.

Thanks