Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Porting a lightweight Web Canvas UI engine to C# #129515

Unanswered
zion-sati asked this question in General
Discussion options

Hi all,

I'm a veteran C# dev (ZionSati is a pseudonym, PM if you want to know what .net nuget packages and popular dotnet apps I've done in the past), and I've built fui-as (https://github.com/zion-sati/fui-as) over the years and recently just released it. It's a Flutter-style (but WPF grade with SwiftUI-style fluent syntax) Web Canvas UI layout engine.

I want to bring this architectural model back to the .net ecosystem to fill the "canvas-rendered UI engine" gap. In fact, fui-as (AssemblyScript version) was a pivot when I discovered that .net would've been a very heavy target in terms of wasm size. AssemblyScript doesn't actually use WasmGC - it bundles its own micro GC which adds roughly another 100kb (before brotli). With Brotli, my demo pages which has pretty heavy demos typically come under 100kb over the wire.

To match AssemblyScript's sub-100kb footprint, the standard enterprise-grade .net gc is too heavy. I'm looking to see if there's a way to get a simple mark and sweep GC for C# WASM using NativeAOT.

The framework is a 3 tier architecture where the top level is a thin language specific binding of the heavy underlying tiers (UI and Core which have Harfbuzz, ICU, Yoga, Skia) in C++. These runtime wasms (~7mb uncompressed) and minimal ICU data (3.5mb uncompressed) and downloaded once, cached forever.

I'd love to hear some thoughts as to how I could have a C# binding (fui-cs) that's just as lightweight, sharing the same runtime wasms and assets (simply via the same C ABIs). Is the ecosystem ready for this yet? If so, some pointers to get me started in the right direction would be helpful.

You must be logged in to vote

Replies: 0 comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant

AltStyle によって変換されたページ (->オリジナル) /