27 lines
553 B
PowerShell
27 lines
553 B
PowerShell
#requires -Version 7
|
|
$ErrorActionPreference = 'Stop'
|
|
|
|
$Root = Resolve-Path (Join-Path $PSScriptRoot '..\..')
|
|
Set-Location $Root
|
|
|
|
if (-not $IsWindows) {
|
|
Write-Error "wrong platform: $($PSVersionTable.OS) - use cargo xtask debug"
|
|
exit 1
|
|
}
|
|
|
|
. (Join-Path $PSScriptRoot '_toolchain.ps1')
|
|
$tc = Get-Toolchain
|
|
Initialize-Toolchain $tc
|
|
|
|
$env:RUST_BACKTRACE = '1'
|
|
|
|
$cargoArgs = @('run','-p','femm-app')
|
|
if ($tc.CargoTarget) {
|
|
$cargoArgs += @('--target',$tc.CargoTarget)
|
|
}
|
|
$cargoArgs += '--'
|
|
$cargoArgs += $args
|
|
|
|
& cargo @cargoArgs
|
|
exit $LASTEXITCODE
|