Skip to content

Add a section in the README for environment variable setup and adjust the Cargo dependencies to match worker-build to prevent Action failures.#2

Closed
afoim wants to merge 17 commits intodeep-gaurav:mainfrom
afoim:main
Closed

Add a section in the README for environment variable setup and adjust the Cargo dependencies to match worker-build to prevent Action failures.#2
afoim wants to merge 17 commits intodeep-gaurav:mainfrom
afoim:main

Conversation

@afoim
Copy link
Copy Markdown

@afoim afoim commented Nov 21, 2025

I made two changes:

  1. Declared the environment variable configuration in the README. I have tested this, and these variables are required; otherwise, the project will not work.
  2. Updated the version of wasm-bindgen in Cargo.toml to prevent GitHub Actions from throwing the following error:
error: 

it looks like the Rust project used to create this Wasm file was linked against
version of wasm-bindgen that uses a different bindgen format than this binary:

 rust Wasm file schema version: 0.2.103
     this binary schema version: 0.2.105 (f72a9d68d)

Currently the bindgen format is unstable enough that these two schema versions
must exactly match. You can accomplish this by either updating this binary or
the wasm-bindgen dependency in the Rust project.

You should be able to update the wasm-bindgen dependency with:

    cargo update -p wasm-bindgen --precise 0.2.105 (f72a9d68d)

don't forget to recompile your Wasm file! Alternatively, you can update the
binary with:

    cargo install -f wasm-bindgen-cli --version 0.2.103

if this warning fails to go away though and you're not sure what to do feel free
to open an issue at https://github.com/wasm-bindgen/wasm-bindgen/issues!

Error: Running the wasm-bindgen CLI

Caused by:
    failed to execute `wasm-bindgen`: exited with exit status: 1
      full command: "/home/runner/.cache/worker-build/wasm-bindgen-x86_64-unknown-linux-musl-0.2.105/wasm-bindgen" "/home/runner/work/warden-worker/warden-worker/target/wasm32-unknown-unknown/release/warden_worker.wasm" "--out-dir" "/home/runner/work/warden-worker/warden-worker/build" "--typescript" "--target" "module" "--out-name" "index" "--experimental-reset-state-function"

afoim and others added 17 commits November 21, 2025 15:33
Auto create database and jwt secrets in action
重构Cloudflare部署流程,将D1数据库创建和schema应用从preCommands拆分为独立步骤
更新Rust依赖版本,包括worker和wasm-bindgen相关包
为Cloudflare相关操作添加CLOUDFLARE_API_TOKEN和CLOUDFLARE_ACCOUNT_ID环境变量,确保工作流能正确执行
将GitHub Actions中的wrangler命令替换为直接调用Cloudflare API的方式
- 创建D1数据库时使用API直接调用并验证响应
- 应用数据库schema时改用API直接执行SQL
- 创建JWT密钥时使用API替代wrangler secret命令
- 增加错误处理和响应状态码检查
@afoim afoim closed this Nov 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants