using System.Runtime.InteropServices; namespace Brutal.SlangApi; /// /// Hand-written ergonomic helpers on top of the generated /// COM interface. Wraps byte*-returning UTF-8 string accessors into managed /// returns so callers don't have to call /// by hand. /// public static unsafe partial class IGlobalSessionExtensions { /// /// Slang's build tag string (e.g. "slang-2026.7"). Returns null if /// the underlying call yields a null pointer. /// public static string? GetBuildTag(this IGlobalSession self) => Marshal.PtrToStringUTF8((nint)self.GetBuildTagString()); }