Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,14 @@ still be able to [build from source](docs/build-from-source.md).
<thead>
<tr>
<td colspan="2" rowspan="2"></td>
<th colspan="2">Linux</th>
<th colspan="3">Linux</th>
<th colspan="2">macOS</th>
<th>Windows</th>
</tr>
<tr>
<th>x64</th>
<th>arm64</th>
<th>arm</th>
<th>x64</th>
<th>arm64</th>
<th>x64</th>
Expand All @@ -57,6 +58,7 @@ still be able to [build from source](docs/build-from-source.md).
<td align="center">✓</td>
<td align="center">✓</td>
<td align="center">✓</td>
<td align="center">✓</td>
</tr>
<tr>
<th>22</th>
Expand All @@ -65,6 +67,7 @@ still be able to [build from source](docs/build-from-source.md).
<td align="center">✓</td>
<td align="center">✓</td>
<td align="center">✓</td>
<td align="center">✓</td>
</tr>
</tbody>
</table>
Expand Down
3 changes: 2 additions & 1 deletion docs/build-from-source.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,11 @@ The supported cross-compilation directions are:
- MacOS arm64 ➡️ MacOS x64
- MacOS x64 ➡️ ️MacOS arm64
- Linux x64 ➡️ Linux arm64
- Linux x64 ➡️ Linux arm (32-bit, e.g. Raspberry Pi 3B+)

To run e.g. that that cross-compilation:

1. Set `TARGET_ARCH` to "arm64"
1. Set `TARGET_ARCH` to "arm64" (or "arm" for 32-bit ARM)
2. Re-run `npm run build`

### Debug Builds
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"optionalDependencies": {
"@roamhq/wrtc-darwin-arm64": "0.10.0",
"@roamhq/wrtc-darwin-x64": "0.10.0",
"@roamhq/wrtc-linux-arm": "0.10.0",
"@roamhq/wrtc-linux-arm64": "0.10.0",
"@roamhq/wrtc-linux-x64": "0.10.0",
"@roamhq/wrtc-win32-x64": "0.10.0",
Expand Down
4 changes: 4 additions & 0 deletions prebuilds/linux-arm/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# wrtc

This is the Linux 32-bit ARM binary build for @roamhq/wrtc.
See https://github.com/WonderInventions/node-webrtc for details.
2 changes: 2 additions & 0 deletions prebuilds/linux-arm/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
"use strict";
module.exports = require("./wrtc.node");
16 changes: 16 additions & 0 deletions prebuilds/linux-arm/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"name": "@roamhq/wrtc-linux-arm",
"version": "0.10.0",
"description": "The Linux 32-bit ARM binary for @roamhq/wrtc.",
"repository": {
"type": "git",
"url": "git+https://github.com/WonderInventions/node-webrtc.git"
},
"license": "BSD-2-Clause",
"os": [
"linux"
],
"cpu": [
"arm"
]
}
4 changes: 4 additions & 0 deletions shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,11 @@ let
nativeBuildInputs =
(with pkgs; [
cmake
curl
git
ninja
nodejs_22
perl
pkg-config
zlib
# For stripping binaries for release
Expand All @@ -41,6 +44,7 @@ let
])
++ (lib.optionals (!is-darwin) [
(llvm pkgs.pkgsCross.aarch64-multiplatform.buildPackages).clang
(llvm pkgs.pkgsCross.armv7l-hf-multiplatform.buildPackages).clang
]);
# Build variables based on documentation from https://github.com/timniederhausen/gn-build/blob/01c96fd9981b111a3a028356284968acd77fa435/README.md
shellHook =
Expand Down
5 changes: 5 additions & 0 deletions toolchains/linux-arm.toolchain
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSTEM_PROCESSOR arm)

set(CMAKE_C_COMPILER armv7l-unknown-linux-gnueabihf-clang)
set(CMAKE_CXX_COMPILER armv7l-unknown-linux-gnueabihf-clang++)