mirror of
https://github.com/tonytins/cstdotnet.git
synced 2025-03-15 06:01:25 +00:00
Preliminary support for .NET 8
- Native compatibility - Parser can now be consumed from non-.NET programming languages
This commit is contained in:
parent
5f6e6c1935
commit
df7197609d
3 changed files with 25 additions and 7 deletions
|
@ -1,5 +1,8 @@
|
|||
// This project is licensed under the BSD 3-Clause license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
#if NET8_0
|
||||
using System.Runtime.InteropServices;
|
||||
#endif
|
||||
|
||||
namespace CSTNet;
|
||||
|
||||
|
@ -30,6 +33,16 @@ public class CST
|
|||
return GetEntry(entries, key);
|
||||
}
|
||||
|
||||
#if NET8_0
|
||||
[UnmanagedCallersOnly(EntryPoint = "parse")]
|
||||
public static IntPtr Parse(IntPtr content, IntPtr key)
|
||||
{
|
||||
// => Parse(Marshal.PtrToStringAnsi(content), Marshal.PtrToStringAnsi(key));
|
||||
var entries = NormalizeEntries(Marshal.PtrToStringAnsi(content));
|
||||
return Marshal.StringToHGlobalAnsi(GetEntry(entries, Marshal.PtrToStringAnsi(key)));
|
||||
}
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Replaces the document's line endings with the native system line endings.
|
||||
/// </summary>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>net6.0;netstandard2.1;net8.0</TargetFrameworks>
|
||||
<Version>2.0.103</Version>
|
||||
<Version>2.0.200-beta1</Version>
|
||||
<Nullable>enable</Nullable>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
|
@ -17,4 +17,9 @@
|
|||
<PackageLicenseExpression>BSD-3-Clause</PackageLicenseExpression>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- Support AOT on .NET 8+ -->
|
||||
<PropertyGroup Condition=" '$(TargetFramework)' == 'net8.0' ">
|
||||
<IsAotCompatible>true</IsAotCompatible>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
|
@ -1,5 +1,11 @@
|
|||
# Change Log
|
||||
|
||||
## 2.0.200
|
||||
|
||||
- Preliminary support for .NET 8
|
||||
- Native compatibility
|
||||
- Parser function can now be consumed from non-.NET programming languages
|
||||
|
||||
## 2.0.102
|
||||
|
||||
- Properly commented and documented the rest of the code.
|
||||
|
@ -14,12 +20,6 @@ Based on FreeSO's API, the ``UIText`` class allows for traversing in ``/<directo
|
|||
|
||||
For more info, see [usage.md](./usage.md).
|
||||
|
||||
### New Release Cycle
|
||||
|
||||
Because this library has no third-party dependencies, CST.NET's release cycle will generally follow .NET's LTS cycle. This is why .NET 5 was skipped. Minor releases will consist of targeting latest LTS.
|
||||
|
||||
For example, 2.5 adds .NET 8.0 next to 6.0 until the latter reaches end of life and finally 2.6 targets only 8.0. Keep in mind, this is all just hypothetical. Realistically, this could happen as soon as 2.2 because parameters will land as earlier as 2.1.
|
||||
|
||||
## 1.0.300
|
||||
|
||||
- Minor patch.
|
||||
|
|
Loading…
Add table
Reference in a new issue