From 90ed18a41fef137ed0637cf9fc6aa667de2c905f Mon Sep 17 00:00:00 2001 From: 魏曹先生 <1992414357@qq.com> Date: Sun, 8 Mar 2026 22:43:34 +0800 Subject: Update dependencies and add C bindings generation --- scripts/deploy/cbindgen.ps1 | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 scripts/deploy/cbindgen.ps1 (limited to 'scripts/deploy/cbindgen.ps1') diff --git a/scripts/deploy/cbindgen.ps1 b/scripts/deploy/cbindgen.ps1 new file mode 100644 index 0000000..4dd9eb9 --- /dev/null +++ b/scripts/deploy/cbindgen.ps1 @@ -0,0 +1,18 @@ +$originalLocation = Get-Location +Set-Location (Split-Path -Parent (Split-Path -Parent $MyInvocation.MyCommand.Path)) + +if (-not (Get-Command cbindgen -ErrorAction SilentlyContinue)) { + cargo install cbindgen +} + +if (Test-Path ffi/.temp/jvlib.h) { + Remove-Item ffi/.temp/jvlib.h +} +$env:RUSTUP_TOOLCHAIN = "nightly" +cbindgen ` + --config cbindgen.toml ` + ffi ` + --output ffi/.temp/jvlib.h ` + --quiet + +Set-Location $originalLocation -- cgit