Tracking issue for Silk.NET 3.0
Perksey opened this issue Β· 33 comments
Silk.NET 3.0 Roadmap
THIS IS A LIVING DOCUMENT
Overview
Welcome to the Silk.NET 3.0 roadmap! This tracks the current progress of 3.0 - the major rewrite project for Silk.NET 3.0. You can read more about why we're doing this in the 3.0 proposal, but basically the .NET world has changed a lot since Silk.NET was originally written (Silk.NET was written against .NET Core 2.1, long before "One .NET" existed), and we want to ensure we ship a library that encourages write-once-run-everywhere and embraces user feedback and modern bindings techniques developed elsewhere within the .NET Foundation.
Learn more about Silk.NET 3.0:
- Silk.NET 3.0 Plan
- Silk.NET 3.0 Bindings Design
- Silk.NET 3.0 Meeting 1
- Silk.NET 3.0 Meeting 2
- SilkX (Silk.NET 3.0) Design Discussion
Proposed Features
SDP
- [Complete] Design & Development - @Perksey
- [Complete] Proposed - @Perksey
- [Complete] Reviewed - @dotnet/silk-dotnet
- [Complete] Approved - @dotnet/silk-dotnet
- [In Progress] Implemented - @dotnet/silk-dotnet
Windowing
- [Complete] Design & Development - @Perksey @HurricanKai
- [Complete] Proposed - @Perksey @HurricanKai
- [Complete] Reviewed - @dotnet/silk-dotnet
- [Complete] Approved - @dotnet/silk-dotnet
- [Complete] Implemented (API) - @Perksey
- [Complete] Pri 0: SDL support - @Perksey
- [Needs Testing] Pri 1: iOS support (TBD) - unassigned
- [Needs Testing] Pri 1: Android support (TBD) - unassigned
Input
- [Complete] Design & Development - @Perksey @ThomasMiz
- [Complete] Proposed - @Perksey @domportera
- [Complete] Reviewed - @dotnet/silk-dotnet
- [Complete] Approved - @dotnet/silk-dotnet
- [Not Started] Implemented (API) - unassigned
- [Not Started] Pri 0: SDL support - unassigned
- [Not Started] Pri 1: Android support (TBD) - unassigned
- [Not Started] Pri 2: iOS support (TBD) - unassigned
SilkTouch & Bindings
- [Complete] Design & Development - @Perksey
- [Complete] GLFW PoC - @Perksey
- [Complete] Proposed (latest) - @Perksey @curin
- [Complete] Reviewed (latest) - @dotnet/silk-dotnet
- [Complete] Approved (latest) - @dotnet/silk-dotnet
- [In Progress] Implemented (see #887) - @Perksey @curin
- [Complete] Pri 0: SDL bindings generated - @Perksey
- [Complete] Pri 0: OpenGL bindings generated - @Perksey
- [In Progress] Pri 0: OpenAL bindings generated - @Perksey
- [In Progress] Pri 1: Vulkan bindings generated - @Exanite
- [In Progress] Pri 1: Windows bindings generated (existing headers covered) - @curin
- [Not Started] Pri 1: OpenXR bindings (should be trivial with Vulkan support done) - unassigned
- [Not Started] Pri 2: OpenCL bindings generated - unassigned
- [Not Started] Pri 3: Assimp bindings generated - unassigned
- [Not Started] Pri 3: WebGPU bindings generated - unassigned
- [Not Started] Pri 4: SPIR-V Reflect bindings generated - unassigned
- [Not Started] Pri 4: SPIR-V Cross bindings generated - unassigned
- [Not Started] Pri 4: Shaderc bindings generated - unassigned
Generic Maths
- [Complete] Design & Development - @Perksey @curin @uwx
- [Complete] Proposed - @Perksey @curin @uwx
- [Complete] Reviewed - @dotnet/silk-dotnet
- [Complete] Approved - @dotnet/silk-dotnet
- [In Progress] Implemented (API) - @Tweety-Lab @otac0n
Milestones
NOTE: The below milestones will be complemented by regular experimental feed updates. The Silk.NET team may add additional previews at their discretion.. Rough timelines for each of the previews may be added to this issue at a later date if the Silk.NET team has a high degree of confidence that they can be met.
THE FEATURES IN EACH PREVIEW SPECIFIED HEREIN DO NOT NECESSARILY HAVE TO BE COMPLETED IN THAT ORDER, IF YOU WOULD LIKE TO WORK ON SOMETHING, PLEASE DO SO! The dependencies for each work item are specified in the Proposed Features section.
The priorities above basically map 1:1 into previews as defined in the SDP's original roadmap as below:
- Preview 1 released with all Pri 0 and some Pri 1 items implemented
- SilkTouch can generate raw bindings
- SilkTouch can do basic rewriting to use wrapper types
- Windowing and Input are implemented for desktop
- SDL
- OpenGL
- OpenAL
- Preview 2 released with all Pri 1 and some Pri 2 items implemented
- Bugfixes from 3.0 Preview 1
- Generic Maths
- Vulkan
- OpenXR
- SilkTouch has more overloads implemented. All generic overloads should be implemented by now, but some API-specific overloads may not be implemented.
- Windowing and Input are implemented for Android.
- Windows SDK bindings (2.X coverage met)
- Preview 3 released with all Pri 2 and some Pri 3 items implemented
- Bugfixes from 3.0 Preview 2
- SilkTouch generator is complete
- Windowing and Input are implemented for iOS
- OpenCL
- Preview 4 released with all Pri 3 and 4 items implemented
- Bugfixes from 3.0 Preview 3
- Assimp
- WebGPU
- SPIR-V Reflect
- SPIR-V Cross
- Shaderc
- Preview 5 released with bugfixes
- Bugfixes from 3.0 Preview 4
- More SIMD?
- RTM
- Bugfixes from 3.0 Preview 5
Untracked Features
NOTE: None of these features are guaranteed for 3.0 and may be pushed to 3.X or cancelled altogether. Some of them have been demoted from the original priorities specified in the SDP.
- [Not Started] WASM support - unassigned
- [Not Started] WebGL bindings - unassigned
- [Not Started] Metal bindings (Objective-C support in ClangSharp) - unassigned
- [Not Started] WPF integration - unassigned
- [Not Started] WinForms integration - unassigned
- [Not Started] Avalonia integration - unassigned
- [Not Started] MAUI integration - unassigned
- [Not Started] SIMD vectorization - unassigned
For clarification. Would WebGL bindings mean that a Silk.NET project could run in the browser over Web Assembly (WASM)?
Yeah exactly, our WebGL and WebGPU bindings are intended to work on Blazor WASM once created to maximise portability of .NET 6 apps.
Mentioned in #345; Just wanted to add a +1 for MAUI support.
MAUI support would also mean WinUI 3/Uno platform support I believe too, so that'd be cool.
We have included MAUI support in our work in progress software development plan for 3.0 and will likely be our top priority after WinForms and WPF support, which analytics and discord activity indicate are in massive demand.
This is definitely something we are keen on getting in.
@Perksey FYI: for an ongoing example of a .NET 3D engine supporting WinUI 3 project reunion example
Any idea when we'll get Metal bindings?
Any idea when we'll get Metal bindings?
No ETA for Metal, and its not something the team is working on at all right now, but we welcome any contributions to move us forward
@dotnet/silk-dotnet I've tried to extrapolate all the info from the proposals (as currently approved) into this issue (see the updated description). It makes no assumption on the outcomes of the current SilkTouch or SilkTouchX/SilkX work, mostly just wanted this for tracking.
Please let me know if you have any issues with the above.
Likewise, if there's any other untracked promises for 3.0 we've made or the community wants to be made, please let me know!
I think GLFW bindings are arguably < 0, I think we agreed those are a good PoC?
Yes you are right... but do you really want a priority -1? That just feels silly! Unless we're using unsigned integers, then we'll a priority 4,294,967,295...
I expect the SilkTouch Design & Development and GLFW bindings tasks to complete at the same time.
I mean it doesn't matter so much, but I'd see GLFW PoC as a separate point - leaving Prio 0 GLFW as an additional item
Okay, done thanks.
I've updated the issue to reflect latest developments. This also has been changed to indicate that we're using SDL3 instead of GLFW as I believe is the consensus on the team, primarily because I've backed down haha
Unless current plans change, generic math should get bumped up to preview 1
SilkTouch Notes
- Mods should be able to declare ordering, TransformFunctions currently must be before PrettifyNames because PrettifyNames, despite having a ridiculous amount of code accounting for it, isn't fully compatible with having lots of functions with the same name. This is its own issue that needs to be worked through, but for now the solution is just whacking the TransformFunctions at the end of the pipeline.
- Is this because of return type conflicts? Should we make this a better experience?
please, keep WPF and WinForms integration. Those are needed for real
I am looking into using silk to replace other c# bindings in a project. Is it worth waiting for 3.0? What is the super rough time frame?
I probably wouldn't wait as we have absolutely no guarantees that 3.0 will even release, let alone a timeframe for that happening. However, we are putting massive amounts of work into 3.0 so it probably won't be too far off, but still likely longer than the time it would take to build an app with 2.0 and migrate to 3.0 later.
We hope to have a good migration story for 3.0 but can't promise it as it is a very breaking release.
Keep it up gents. You got this.
I probably wouldn't wait as we have absolutely no guarantees that 3.0 will even release, let alone a timeframe for that happening. However, we are putting massive amounts of work into 3.0 so it probably won't be too far off, but still likely longer than the time it would take to build an app with 2.0 and migrate to 3.0 later.
We hope to have a good migration story for 3.0 but can't promise it as it is a very breaking release.
I don't know about others, but I for one am all for a breaking-but-uncompromised release more so than one that misses out on things due to a need for backward compatibility.
Semantic versioning! That's what Major-digit releases are for. π€
The team is doing fantastic work!
Thanks! To clarify where my head is at (this is not representative of the team), I am not backing down on breaking the API - our current API surface is not kind to IDEs and for this and many other reasons it must change in 3.0. The idea is if you have a 3.0 package in your dependency tree that you know about, then youβre opting into 3.0βs API. However, I believe that thereβs something we can do about ABI compatibility and this is what I want to research further.
Again this is my view, not that of the team, but ABI compatibility is important now that we have e.g. Uno Platform pulling us in - by being a complete ABI break, 3.0 would be unusable on Uno Platform, which is not what I want. I also want to show that we are dependable for these types of big solutions. So the goal would likely be 3.0 shipping reference assemblies with only the 3.0 API, but the assemblies containing a stub implementation of the 2.X ABI to forward to the 3.0 API. This way if youβre referencing a 3.0 package, your IDE will never pick up on the 2.X APIs, but theyβll be there just in case you pull in a package or an assembly that was built against 2.X. This also provides a nice migration story given that you can keep your code that is yet to be migrated in one project referencing 2.X, and slowly start moving it to another project that references 3.0 while still using code from your 2.X project.
However, a lot of research needs to be done into this to see if itβs even feasible (there are a lot of problems to be solved with abusing reference assemblies in this way) so no promises and again I canβt stress enough that this is my idea and the Silk.NET team may shut it down.
Very interesting. Thank you for explaining and breaking this down!
Big tracker update today! Windowing 3.0 has just landed on the experimental feed, it is in theory implemented on all platforms but we haven't tested Android or iOS yet. Win32 bindings have started work thanks to the excellent @curin (who is also reviewing all of my stuff, the guy never stops) and may make it into 3.0 Preivew 1. Input's proposal work is now approved as well (thanks to a great many contributions from @domportera!), and this is next to start implementation (likely by me). OpenAL bindings remain the last thing after this that stands before a 3.0 Preview 1, and I would personally love if a community contributor wanted to give it a go but if not this should be an easy thing to do at the tail end of the dev cycle.
Thank you to the experimental feed early adopters, you are amazing and your input is really valuable!
@Perksey
Regarding Windowing 3.0, based on #209 (comment)
I've updated the issue to reflect latest developments. This also has been changed to indicate that we're using SDL3 instead of GLFW as I believe is the consensus on the team, primarily because I've backed down haha
One can conclude that the 2022 windowing 3.0 proposal has outdated backend definition
The decision has been made to drop SDL due to complications and the fact that all non-desktop targets are distinctly unique in their own right. We believe that in creating platform-specific code for each of these will result in significantly more robust support for each of these platforms.
QUESTION: Should we drop our SDL bindings too?
MAINTAINERS' ANSWER: Yes, it's no longer used by us and a library such as SDL is a large amount of maintenance weight to carry. Akin to us dropping EGL in the 1.X-2.0 transition, we will be dropping our SDL answer.
BTW, going forward with SDL3 was a very solid choice, it's kind of unofficial industry standard, promoted by Epic and Valve, hard tested, and virtually supports any gaming platform still alive
Yes this is true, the proposal is out-of-date, but I vaguely recall putting some "the team reserves the right to change the reference implementation" get-out wording in there so... I guess it's still correct?
Correction: it's this issue that is linking to an out-of-date proposal. The main branch has a rewritten proposal.
windowing 3.0 all good, thanks for the clarification
@Perksey is it possible for Silk.NET 3.0 to take advantage of the SDL3 main callbacks optimizations for mobile?
There are platforms that would rather be in charge of that while loop: iOS would rather you return from main() immediately and then it will let you know that it's time to update and draw the next frame of video. Emscripten (programs that run on a web page) absolutely requires this to function at all. Video targets like Wayland can notify the app when to draw a new frame, to save battery life and cooperate with the compositor more closely.
Not today