XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet

XFESystem

【Rust】XFE系统,基于Rust和汇编

公开
关注 0 Fork 0 Star 0
UTF-8
namespace XFESystem.ManagedRuntime;

/// <summary>This is a small interpreter/interop layer, not Microsoft's CoreCLR.</summary>
public static class ManagedRuntimeCapabilities
{
    public const string Profile = "XFESystem.Net10.ConsoleIL.v1";
    public const string TargetFramework = ".NETCoreApp,Version=v10.0";
    public const bool FullDotNet10 = false;
    public const bool DotNetFramework48 = false;
    public const bool Jit = false;
    public const bool PInvoke = false;
    public const int MaxImageBytes = 4 * 1024 * 1024;
    public const int MaxInstructions = 100_000;
    public const int MaxOutputCharacters = 65_536;
    public const int MaxStringCharacters = 65_536;
    public const int MaxTotalStringCharacters = 1024 * 1024;
}

public readonly record struct ManagedExecutionResult(string AssemblyName, int Instructions, int ExitCode, int InteropCalls);

public interface IManagedConsole
{
    ConsoleColor ForegroundColor { get; set; }
    ConsoleColor BackgroundColor { get; set; }
    void ResetColor();
    void Write(string value);
    void WriteLine(string value);
    void XfeWriteLine(string value);
}