Skip to content

qawolf/node-webrtc

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

    

NPM

node-webrtc is a Node.js Native Addon that provides bindings to WebRTC M98. This project is aiming for spec-compliance and will eventually be tested using the W3C's web-platform-tests project. A number of nonstandard APIs for testing are also included.

Install

npm install @qawolf/wrtc

Installing from NPM downloads a prebuilt binary for your operating system × architecture, based on optional dependency filters.

To install a debug build or cross-compile, you should build from source.

Supported Platforms

The following platforms are confirmed to work with node-webrtc and have prebuilt binaries available. Since node-webrtc targets N-API version 3, there may be additional platforms supported that are not listed here. If your platform is not supported, you may still be able to build from source.

Linux macOS Windows
x64 arm64 x64 arm64 x64
Node 20 ?
22 ?

Examples

See node-webrtc/node-webrtc-examples.

Maintainer Guide: Building & Publishing

This fork (@qawolf/wrtc) includes custom scripts to facilitate building for Linux (via Docker) and macOS.

Prerequisites

Ensure you are authenticated with the GitHub Package Registry. Your ~/.npmrc should be configured with your PAT, or you can use the project-level .npmrc provided.

1. Build Linux Artifacts (x64 and arm64)

To build the Linux binaries (used in production environments), use the provided Docker scripts. These handle cross-compilation quirks and patch the binaries for portability.

Parallel Build (Recommended): Builds both x64 and arm64 binaries in parallel.

./scripts/build-parallel-docker.sh

Single Architecture Build: You can also build for a specific architecture by setting TARGET_ARCH (defaults to x64).

# Build for x64
./scripts/build-incremental-docker.sh

# Build for arm64
TARGET_ARCH=arm64 ./scripts/build-incremental-docker.sh

Artifacts will be placed in prebuilds/linux-x64/ and prebuilds/linux-arm64/.

2. Publishing

Publishing must be done in a specific order: first the platform-specific binaries, then the main package.

Step A: Publish Platform Binaries

Navigate to each built platform folder in prebuilds/ and publish them.

# Example for Linux x64
cd prebuilds/linux-x64
npm publish
cd ../..

# Example for Linux arm64
cd prebuilds/linux-arm64
npm publish
cd ../..

Step B: Publish Main Package Once the platform binaries are published, publish the root package. It references the others as optionalDependencies.

npm publish

About

node-webrtc is a Node.js Native Addon that provides bindings to WebRTC M98

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 71.9%
  • JavaScript 24.1%
  • CMake 2.1%
  • Shell 0.9%
  • Nix 0.5%
  • Batchfile 0.4%
  • Ruby 0.1%