Skip to content

[RFC] Allow packages users build Rust codes from source #1474

@Brooooooklyn

Description

@Brooooooklyn

Background

Some users complain about dependencies on node-gyp native binaries; because the compliance policy at their company wanted to audit the source code (and how can we prove that the downloaded binary was built from the code?).

We will keep our publishing strategy (optionalDependencies prebuilt binary), but add rebuild command to our cli to allow users to rebuild Rust code to binaries.

  • Publish Rust source codes into npm packages as default
  • **/*.rs
  • Cargo.toml
  • Cargo.lock
  • .cargo/**
  • napi rebuild command (This feature also allow users to generate debug symbols locally and debug the thrid part package)
    • napi rebuild package name
    • napi rebuild node_modules/PATH
    • napi rebuild all, to rebuild all NAPI-RS packages in node_modules

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions