<!-- livebook:{"spiral_code":"pwsh"} -->

```pwsh
. ./nbs_header.ps1
. ./core.ps1
```

<!-- livebook:{"spiral_code":"pwsh"} -->

```pwsh
# rustup component add clippy rust-src rustfmt
```

<!-- livebook:{"spiral_code":"pwsh"} -->

```pwsh
# rustup target add wasm32-unknown-unknown
```

<!-- livebook:{"spiral_code":"pwsh"} -->

```pwsh
# rustup update
```

<!-- livebook:{"spiral_code":"pwsh"} -->

```pwsh
if (!(Search-Command "cargo-binstall")) {
    # { cargo +nightly-2025-11-01 install --timings cargo-binstall --locked } | Invoke-Block -OnError Continue
    if ($IsWindows) {
        Set-ExecutionPolicy Unrestricted -Scope Process; iex (iwr "https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.ps1").Content
    } else {
        curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
    }
}
```

<!-- livebook:{"spiral_code":"pwsh"} -->

```pwsh
if (!(Search-Command "cargo-outdated")) {
    $url = git ls-remote --get-url
    $owner = ($url -split '/' | Select-Object -Last 2 | Select-Object -First 1) -replace '\.git$', '' ?? $env:GITHUB_REPOSITORY_OWNER
    $domain = ($url -split '/' | Select-Object -Last 3 | Select-Object -First 1) ?? $env:GITHUB_SERVER_URL -replace 'https?://', ''
    Write-Output "polyglot/scripts/init.livemd / url: $url / owner: $owner / domain: $domain"

    { cargo binstall -y --git https://$domain/$owner/cargo-outdated.git --locked cargo-outdated } | Invoke-Block -OnError Continue
}
```

<!-- livebook:{"spiral_code":"pwsh"} -->

```pwsh
if (!(Search-Command "sccache")) {
    # { cargo install --timings sccache --locked } | Invoke-Block -OnError Continue
    { cargo binstall -y sccache } | Invoke-Block -OnError Continue
}
```

<!-- livebook:{"spiral_code":"pwsh"} -->

```pwsh
if (!(Search-Command "wasm-pack")) {
    # { cargo install --timings wasm-pack --locked } | Invoke-Block -OnError Continue
    { cargo binstall -y wasm-pack } | Invoke-Block -OnError Continue
}
```

<!-- livebook:{"spiral_code":"pwsh"} -->

```pwsh
if (!(Search-Command "trunk")) {
    # { cargo install --timings trunk --version 0.21.14 } | Invoke-Block -OnError Continue
    { cargo binstall -y trunk --version 0.21.14 } | Invoke-Block -OnError Continue
}
```

<!-- livebook:{"spiral_code":"pwsh"} -->

```pwsh
if (!(Search-Command "nix")) {
    { . $(Search-Command bunx) --bun playwright@1.44.0 install } | Invoke-Block -OnError Continue
}
```

<!-- livebook:{"spiral_code":"pwsh"} -->

```pwsh
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
```

<!-- livebook:{"spiral_code":"pwsh"} -->

```pwsh
{ Install-Module -Name PowerShellGet -Force -AllowClobber -Scope CurrentUser } | Invoke-Block -OnError Continue
```

<!-- livebook:{"spiral_code":"pwsh"} -->

```pwsh
{ if ((Get-PSRepository -Name PSGallery).InstallationPolicy -ne 'Trusted') { Set-PSRepository -Name PSGallery -InstallationPolicy Trusted } } | Invoke-Block -OnError Continue
```

<!-- livebook:{"spiral_code":"pwsh"} -->

```pwsh
{ . $(Search-Command bun) install --cwd .. --frozen-lockfile } | Invoke-Block
```

<!-- livebook:{"spiral_code":"pwsh"} -->

```pwsh
{ . "$ScriptDir/dep_spiral.ps1" } | Invoke-Block
```

<!-- livebook:{"spiral_code":"pwsh"} -->

```pwsh
{ . "$ScriptDir/dep_spiral_extension.ps1" } | Invoke-Block -OnError Continue
```

<!-- livebook:{"spiral_code":"pwsh"} -->

```pwsh
if (!(Test-Path ../deps/hyperui/.next/package.json)) {
    { . "$ScriptDir/dep_hyperui.ps1" } | Invoke-Block
}
```
