diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index ecf315b..64b590a 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -54,4 +54,4 @@ jobs:
run: dotnet build --configuration Release --no-restore
- name: Run Tests
- run: dotnet test --configuration Release --no-build --verbosity normal
\ No newline at end of file
+ run: dotnet test --configuration Release --no-build --verbosity normal Spec.Test/Spec.Test.csproj
\ No newline at end of file
diff --git a/.gitignore b/.gitignore
index 453a27b..ada60b1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -84,7 +84,6 @@ output/
riderModule.iml
/_ReSharper.Caches/
-/Spec.Test/generated-json/**
/Wacs.Console/Data/**
.DS_Store
diff --git a/.gitmodules b/.gitmodules
index ebc337c..62c73e2 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -7,3 +7,6 @@
[submodule "unity"]
path = unity
url = git@github.com:kelnishi/WACS-Unity.git
+[submodule "Feature.Detect/wasm-feature-detect"]
+ path = Feature.Detect/wasm-feature-detect
+ url = git@github.com:GoogleChromeLabs/wasm-feature-detect.git
diff --git a/Feature.Detect/.gitignore b/Feature.Detect/.gitignore
new file mode 100644
index 0000000..f001fa3
--- /dev/null
+++ b/Feature.Detect/.gitignore
@@ -0,0 +1,40 @@
+# Node modules
+node_modules/
+npm-debug.log
+yarn-error.log
+package-lock.json
+yarn.lock
+
+# Build outputs
+dist/
+build/
+
+# Environment variables
+.env
+.env.local
+.env.*.local
+
+# IDE and editor specific files
+.idea/
+.vscode/
+*.sublime-project
+*.sublime-workspace
+
+# OS generated files
+.DS_Store
+Thumbs.db
+
+# Logs
+logs/
+*.log
+
+# Temporary files
+tmp/
+temp/
+
+
+#generated files
+/generated-wasm/**
+
+#test run
+/TestResults/**
\ No newline at end of file
diff --git a/Feature.Detect/DetectFeatures.cs b/Feature.Detect/DetectFeatures.cs
new file mode 100644
index 0000000..fe8232b
--- /dev/null
+++ b/Feature.Detect/DetectFeatures.cs
@@ -0,0 +1,43 @@
+using Spec.Test;
+using Wacs.Core;
+using Wacs.Core.Runtime;
+using Wacs.Core.Types;
+using Xunit;
+
+namespace Feature.Detect;
+
+public class DetectFeatures
+{
+ [Theory]
+ [ClassData(typeof(FeatureDetectTestData))]
+ public void Detect(FeatureJson.FeatureJson file)
+ {
+ if (!string.IsNullOrEmpty(file.Module))
+ {
+ try
+ {
+ var runtime = new WasmRuntime();
+
+ //Mutable globals
+ var mutableGlobal = new GlobalType(ValType.I32, Mutability.Mutable);
+ runtime.BindHostGlobal(("a", "b"), mutableGlobal, 1);
+
+ var filepath = Path.Combine(file.Path, file.Module);
+ using var fileStream = new FileStream(filepath, FileMode.Open);
+ var module = BinaryModuleParser.ParseWasm(fileStream);
+ var modInst = runtime.InstantiateModule(module);
+ var moduleName = !string.IsNullOrEmpty(file.Name)?file.Name:$"{filepath}";
+ module.SetName(moduleName);
+ }
+ catch (Exception e)
+ {
+ Assert.Fail($"{file.Name} support not detected.\n{e}");
+ }
+
+ }
+ else
+ {
+ Assert.Fail($"{file.Name} not supported.");
+ }
+ }
+}
\ No newline at end of file
diff --git a/Feature.Detect/Feature.Detect.csproj b/Feature.Detect/Feature.Detect.csproj
new file mode 100644
index 0000000..f91be62
--- /dev/null
+++ b/Feature.Detect/Feature.Detect.csproj
@@ -0,0 +1,35 @@
+
+
+
+ Exe
+ net6.0
+ enable
+ enable
+
+
+
+
+
+
+
+
+
+
+
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
+
+
+
+
+ Always
+
+
+
+
+
+
+
+
diff --git a/Feature.Detect/FeatureDetectTestData.cs b/Feature.Detect/FeatureDetectTestData.cs
new file mode 100644
index 0000000..4387785
--- /dev/null
+++ b/Feature.Detect/FeatureDetectTestData.cs
@@ -0,0 +1,73 @@
+// /*
+// * Copyright 2024 Kelvin Nishikawa
+// *
+// * Licensed under the Apache License, Version 2.0 (the "License");
+// * you may not use this file except in compliance with the License.
+// * You may obtain a copy of the License at
+// *
+// * http://www.apache.org/licenses/LICENSE-2.0
+// *
+// * Unless required by applicable law or agreed to in writing, software
+// * distributed under the License is distributed on an "AS IS" BASIS,
+// * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// * See the License for the specific language governing permissions and
+// * limitations under the License.
+// */
+
+using System.Collections;
+using System.Text.Json;
+using System.Text.Json.Serialization;
+using Feature.Detect.FeatureJson;
+using Microsoft.Extensions.Configuration;
+
+namespace Spec.Test
+{
+ public class FeatureDetectTestData : IEnumerable