Repository navigation
fix(cli): align build and project configuration - #3387
Conversation
📝 WalkthroughWalkthroughThe CLI now supports newer Node.js and Node-API versions, updates generated Cargo configuration, handles explicit binaries and Android prerequisites, resolves relative WASI artifact paths, prioritizes DTS headers, and adds regression coverage and documentation updates. ChangesCLI behavior and compatibility
Estimated code review effort: 3 (Moderate) | ~30 minutes Sequence Diagram(s)sequenceDiagram
participant ProjectCreator
participant OptionProcessor
participant CargoTomlUpdater
participant CargoToml
ProjectCreator->>OptionProcessor: validate minimum Node-API version
OptionProcessor-->>ProjectCreator: normalized project options
ProjectCreator->>CargoTomlUpdater: apply Node-API configuration
CargoTomlUpdater->>CargoToml: rewrite napi features and defaults
Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_0ebb1872-ca25-4a61-9cd1-382522adb4a0) |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 51707a4aea
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_dd406df8-9a27-4451-979c-bc1a63e26ec0) |
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_e90b7d68-29d6-4eb8-ba11-e8c4119ef2b8) |
Summary
This consolidates the current CLI and README fixes into one change set:
--binanddtsHeaderFileoptionsANDROID_NDK_LATEST_HOMEfor Android cross-buildsnapi new --min-node-apito the generated Cargo featuresnapicrate's CLI setup exampleWhy
Several user-facing settings were advertised or accepted without being applied consistently:
--binTogether these fixes make the CLI's declared configuration match the behavior users receive.
Validation
yarn workspace @napi-rs/cli test(123 passed)yarn workspace @napi-rs/cli buildgit diff --check origin/main...HEADThe Android behavior already matches the deployed documentation at https://napi.rs/docs/cross-build#android.