using System.IO;
using UnityEngine;
using Wacs.Core;

namespace KitsuneCafe.Scripting
{
    public class WasmAsset : ScriptableObject
    {
        [HideInInspector]
        public byte[] data;

        public Wacs.Core.Module CreateModule()
        {
            var stream = new MemoryStream(data);
            return BinaryModuleParser.ParseWasm(stream);
        }
    }
}
