diff --git a/.github/workflows/windows-test.yml b/.github/workflows/windows-test.yml
index 64394a2a1..0e5b800e1 100644
--- a/.github/workflows/windows-test.yml
+++ b/.github/workflows/windows-test.yml
@@ -46,7 +46,7 @@ jobs:
       - name: Set up the environment
         run: cmd.exe /c "powershell .\tools\metacall-environment.ps1 $Env:METACALL_INSTALL_OPTIONS"
         env:
-          METACALL_INSTALL_OPTIONS: python nodejs java ruby typescript wasm # netcore5 file rpc java c cobol rust rapidjson funchook swig pack # clangformat v8rep51 coverage
+          METACALL_INSTALL_OPTIONS: python nodejs c java ruby typescript wasm  # netcore5 file rpc java c cobol rust rapidjson funchook swig pack # clangformat v8rep51 coverage
 
       - name: Configure
         run: |
@@ -55,7 +55,7 @@ jobs:
           cd "$METACALL_PATH\build"
           cmd.exe /c "powershell ..\tools\metacall-configure.ps1 $Env:METACALL_BUILD_OPTIONS"
         env:
-          METACALL_BUILD_OPTIONS: ${{ matrix.options.build }} ${{ matrix.options.sanitizer }} scripts ports tests python nodejs java ruby typescript wasm # netcore5 file rpc java c cobol rust examples install pack benchmarks # v8 coverage
+          METACALL_BUILD_OPTIONS: ${{ matrix.options.buildtype }} ${{ matrix.options.sanitizer }} scripts ports tests python nodejs c java ruby typescript wasm # netcore5 file rpc java c cobol rust examples install pack benchmarks # v8 coverage
 
       - name: Build
         working-directory: ./build
diff --git a/tools/metacall-environment.ps1 b/tools/metacall-environment.ps1
index 9304c9e66..e9a90f78a 100755
--- a/tools/metacall-environment.ps1
+++ b/tools/metacall-environment.ps1
@@ -160,6 +160,76 @@ function Set-Ruby {
 	Write-Output "-DRuby_LIBRARY=""$RubyDir/lib/x64-vcruntime140-ruby310.lib""" >> $Env_Opts
 }
 
+function Set-C {
+	Write-Output "Install C depenendencies"
+
+	Set-Location $ROOT_DIR
+
+	$DepsDir = "$ROOT_DIR\dependencies"
+	$repositoryUrl = "https://github.com/newlawrence/Libffi.git"
+	$destinationPath = "$DepsDir\libffi"
+	Clone-GitRepository -repositoryUrl $repositoryUrl -destinationPath $destinationPath
+
+	
+	mkdir "$destinationPath\build"
+	Set-Location "$destinationPath\build"
+
+	cmake .. -G"Visual Studio 16 2019"
+
+	cmake --build . --target ffi
+
+	Set-Choco
+
+	# choco install llvm -y
+	choco install llvm -y
+
+
+	$Env_Opts = "$ROOT_DIR\build\CMakeConfig.txt"
+
+	$LLVM_Dir1 = "$env:ProgramW6432/LLVM".Replace('\', '/')
+	#  find a way to pass multiple locations to cmake
+	# $LLVM_Dir2 = "$env:ProgramFiles/LLVM".Replace('\', '/')
+	$LibFFI_Dir = $destinationPath.Replace('\','/')
+
+	Write-Output "-DLIBFFI_LIBRARY=""$LibFFI_Dir/build/lib/libffi.lib""" >> $Env_Opts
+	Write-Output "-DLIBFFI_INCLUDE_DIR=""$LibFFI_Dir/build/include/""" >> $Env_Opts
+	Write-Output "-DLibClang_INCLUDE_DIR=""$LLVM_Dir1/include/clang""" >> $Env_Opts
+
+}
+
+
+function Clone-GitRepository {
+    param (
+        [string]$repositoryUrl,
+        [string]$destinationPath
+    )
+
+    # Check if Git is installed
+    if (-not (Get-Command git -ErrorAction SilentlyContinue)) {
+        Write-Error "Git is not installed. Please install Git and try again."
+        return
+    }
+
+    # Check if the destination path already exists
+    if (Test-Path $destinationPath) {
+        Write-Error "Destination path already exists. Please provide a different path."
+        return
+    }
+
+    # Clone the repository using Git
+    & git clone $repositoryUrl $destinationPath
+
+    # Check if the cloning was successful
+    if ($LASTEXITCODE -ne 0) {
+        Write-Error "Failed to clone the repository."
+        return
+    }
+
+    Write-Output "Repository cloned successfully."
+}
+
+
+
 function Add-to-Path {
 	$GivenPath = $args[0]
 
@@ -203,6 +273,22 @@ function Set-TypeScript {
 	npm i react-dom@latest -g
 }
 
+function Set-Choco {
+	# Set directory for installation - Chocolatey does not lock
+	# down the directory if not the default
+	$InstallDir='C:\ProgramData\chocoportable'
+	$env:ChocolateyInstall="$InstallDir"
+
+	# If your PowerShell Execution policy is restrictive, you may
+	# not be able to get around that. Try setting your session to
+	# Bypass.
+	Set-ExecutionPolicy Bypass -Scope Process -Force;
+
+	# All install options - offline, proxy, etc at
+	# https://chocolatey.org/install
+	iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
+}
+
 # Configure
 function Configure {
 	# Create option variables file 
@@ -275,6 +361,7 @@ function Configure {
 		}
 		if ( "$var" -eq 'c' ) {
 			Write-Output "c selected"
+			Set-C
 		}
 		if ( "$var" -eq 'cobol' ) {
 			Write-Output "cobol selected"