Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .github/workflows/bindgen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ permissions:

env:
CARGO_TERM_COLOR: always
LLVM_VERSION: "20.1.6"

jobs:
bindgen:
Expand Down Expand Up @@ -41,6 +42,19 @@ jobs:

- uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2

- name: Install pinned LLVM
uses: KyleMayes/install-llvm-action@ebc0426251bc40c7cd31162802432c68818ab8f0 # v2.0.9
with:
version: ${{ env.LLVM_VERSION }}
directory: ${{ runner.temp }}/llvm

- name: Select pinned libclang
shell: pwsh
run: |
$libraryDir = if ($IsWindows) { "bin" } else { "lib" }
$libclangPath = Join-Path $env:LLVM_PATH $libraryDir
echo "LIBCLANG_PATH=$libclangPath" >> $env:GITHUB_ENV

- name: Generate bindings
shell: pwsh
run: |
Expand Down
6 changes: 6 additions & 0 deletions symcrypt-bindgen/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ own raw bindings.

## Updating Bindings

Use the exact LLVM version specified by `LLVM_VERSION` in
[the Bindgen workflow](../.github/workflows/bindgen.yml). All four CI targets use this version.
Set `LIBCLANG_PATH` to that LLVM installation's `bin` directory on Windows or `lib` directory
on Linux, and put its `bin` directory first on `PATH`. Pinning the bindgen crate alone does
not pin the libclang library it loads.

To create new bindings, run the following command:

```powershell
Expand Down
Loading