FluxSharpPackageValidator

csharp
public static class FluxSharpPackageValidator

Namespace NodeWorld.SDK.Shared.

Checks the FL# part of a world package before the game or the server runs it: manifest fields and native module header. The creator's signature and the SHA-256 of each file are WorldPackageCheck's.

Constants

LanguageName

csharp
public const string LanguageName = "FluxSharp"

The script language a FL# world declares in its manifest.

RuntimeName

csharp
public const string RuntimeName = "wamr-aot"

The runtime FL# modules are compiled for (WAMR ahead-of-time).

CurrentAbiVersion

csharp
public const int CurrentAbiVersion = 3

ABI of the native runtime nodeworld_fluxsharp (NWF_ABI_VERSION, Native.AbiVersion of NodeWorld.Flux.Host).

LinuxArm64Target

csharp
public const string LinuxArm64Target = "LinuxArm64"

The platform of a world's FL# module for Linux ARM64 game servers. It has no bundle (servers do not load the scene's bundle) and no Unity build target: the World Publisher compiles only the scripts for it.

LinuxArm64Architecture

csharp
public const string LinuxArm64Architecture = "aarch64"

The processor architecture of LinuxArm64Target's module.

Methods

IsFluxSharp

csharp
public static bool IsFluxSharp(WorldManifest manifest)

The world's scripts are FL#.

HasFluxSharpRuntimeArtifacts

csharp
public static bool HasFluxSharpRuntimeArtifacts(WorldManifest manifest)

At least one platform of the world has a FL# module.

ValidateManifest

csharp
public static void ValidateManifest(WorldManifest manifest)

Throws when the manifest's FL# fields are missing, or a file a platform names is not in its signed file list.

ValidatePlatformRuntimeArtifact

csharp
public static void ValidatePlatformRuntimeArtifact(WorldManifest manifest, WorldManifestPlatform platform)

Throws when platform's FL# fields are missing, of another ABI version or for an unsupported target.

ValidateAotHeader

csharp
public static void ValidateAotHeader(byte[] aotBytes)

Throws unless aotBytes is a WAMR AOT module (raw WebAssembly is refused).

ComputeSha256Hex

csharp
public static string ComputeSha256Hex(byte[] bytes)

The SHA-256 of bytes, as lowercase hexadecimal.

IsSupportedPlatformTarget

csharp
public static bool IsSupportedPlatformTarget(string target, string architecture)

The game or a server can run FL# modules for this platform and architecture.

IsServerOnlyPlatform

csharp
public static bool IsServerOnlyPlatform(string target)

The platform only has a FL# module for servers, no bundle (LinuxArm64Target).