
* feat: tokenizers This reverts commit d5a4db8321d232a1b9c0d86fc38e8dd516d15776. * fix(inputs): #422 Signed-off-by: Aaron Pham <contact@aarnphm.xyz> --------- Signed-off-by: Aaron Pham <contact@aarnphm.xyz>
30 lines
651 B
PowerShell
30 lines
651 B
PowerShell
param (
|
|
[string]$Version = "luajit"
|
|
)
|
|
|
|
$BuildDir = "build"
|
|
$BuildFromSource = $true
|
|
|
|
function Build-FromSource($feature) {
|
|
if (-not (Test-Path $BuildDir)) {
|
|
New-Item -ItemType Directory -Path $BuildDir | Out-Null
|
|
}
|
|
|
|
cargo build --release --features=$feature
|
|
|
|
$targetFile = "avante_tokenizers.dll"
|
|
Copy-Item (Join-Path "target\release\libavante_tokenizers.dll") (Join-Path $BuildDir $targetFile)
|
|
|
|
Remove-Item -Recurse -Force "target"
|
|
}
|
|
|
|
function Main {
|
|
Set-Location $PSScriptRoot
|
|
Write-Host "Building for $Version..."
|
|
Build-FromSource $Version
|
|
Write-Host "Completed!"
|
|
}
|
|
|
|
# Run the main function
|
|
Main
|