Skip to content

Latest commit

 

History

History
49 lines (30 loc) · 1.39 KB

File metadata and controls

49 lines (30 loc) · 1.39 KB

Development

Contributing

See CONTRIBUTING.md.

Development setup

To build libdatadog-nodejs locally (for example, to run tests or try out changes), you need Node.js, Yarn, and Rust.

Rust (required for native and WASM builds)

The project compiles Rust for both native Node.js addons and WebAssembly. Use rustup (the recommended and supported method):

  1. Install rustup and Rust (see https://rustup.rs/ for more options):

    curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
  2. Ensure Rust is on PATH — the rustup installer prints the command for your shell; run it or open a new terminal.

  3. Add the WebAssembly target (required for the full build):

    rustup target add wasm32-unknown-unknown
  4. On macOS only — the WASM build requires LLVM from Homebrew (Apple's Clang has compatibility issues with some crates). Install it before building:

    brew install llvm
  5. Install dependencies:

    yarn install

Building

  • yarn build: Build the default workspaces in debug mode.
  • yarn build-release: Build the default workspaces in release mode.
  • yarn build-all: Build all workspaces in debug mode. This is useful when working on a workspace that is not a default member yet.

Run tests

  • yarn test: Run the JavaScript test suite