Closed codiemorgan closed 3 years ago
As per the title, I am wondering if we may get NetStandard2.0 builds of MarkDig which do not reference System.Memory, or a build conditional which could be implemented to allow building from source to allow for builds which exclude optimizations which may rely on System.Memory and System.Buffers?
We don't want to rollback the work that was done to improve performance, nor we want to maintain special case for older/constrained frameworks.
But you should be able to use this old version 0.18.3 of Markdig which didn't have these dependencies in netstandard 2.0.
As per the title, I am wondering if we may get NetStandard2.0 builds of MarkDig which do not reference System.Memory, or a build conditional which could be implemented to allow building from source to allow for builds which exclude optimizations which may rely on System.Memory and System.Buffers?
This is primarily for compatibility within Unity and it's supported platform targets. To get around this, I currently use CommonMark, and intend to use it to to allow markdown formatting of In-game ui elements/quests, etc and to enable support for Markdown Files/Strings within unity's inspectors by translating HTML output into USS/UXML layouts.
System.Memory is an obstacle if we wish to build for WebGL and Mobile Platforms within Unity using NetStandard2.0, but is possible (with additional setup) to use when targeting .NET4.X on standalone (Desktop) platforms.
There are some other limitations which may affect Markdig compatibility with unity's NetStandard2 implementation (below).
My hope is for a variant of Markdig which will function out of the box in when taking the following into account
Targeting .NetStandard2/NET461 within Unity (manual create and edit csc.rsp, not guaranteed for all platforms)
Net4.X: Minimum target is 4.6.1, maximum is a limited subset up to 4.7.
NetStandard: Only 2.0 is supported currently.
IL2CPP / AOT Platforms (with code stripping) - when using NetStandard2 while targeting WebGL
IL2CPP / AOT Platforms when targeting IOS/Android from within Unity (threading is possible).
Android: System.IO functionality is limited (UnityWebRequest required to
download
from persistant data to a temp file before System.IO can be used to load a file)(NetStandard2) System.Buffers unusable within Unity on all platforms
(NetStandard2) System.Memory - depends on System.Buffers.
(NetStandard2) System.Text.Json unusable within Unity on all platforms
Other .Net assemblies require csc.rsp file edits by hand.