Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Add arm64 support and mimalloc allocator to AIOStreams
- var_arm64: yes. Upstream publishes official multi-arch (amd64+arm64)
  images at ghcr.io/viren070/aiostreams, and their Dockerfile confirms
  the one native dependency without an arm64 prebuild (yencode) is
  expected to compile from source via node-gyp there - the same
  build-essential/python3/make/g++ toolchain this script already
  installs. Not independently run on arm64 hardware by this script's
  author; flagged in the ct script comment.
- LD_PRELOAD the mimalloc allocator (libmimalloc3, matching upstream's
  production image) for the running service. The shared object's path
  is arch-dependent (/usr/lib/<triplet>/libmimalloc.so.3), so it's
  resolved via dpkg -L at install time rather than hardcoded, which
  also makes this correct on both amd64 and arm64.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
  • Loading branch information
MrNRod and claude committed Oct 5, 2026
commit fec64b692db39350a0da92661cbb6e2dc87722c1
2 changes: 1 addition & 1 deletion ct/aiostreams.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ var_ram="${var_ram:-2048}"
var_disk="${var_disk:-8}"
var_os="${var_os:-debian}"
var_version="${var_version:-13}"
var_arm64="${var_arm64:-no}"
var_arm64="${var_arm64:-yes}" # upstream ships official multi-arch (amd64+arm64) images; not independently verified on arm64 hardware by this script's author
Comment thread
CrazyWolf13 marked this conversation as resolved.
Resolved
var_unprivileged="${var_unprivileged:-1}"

header_info "$APP"
Expand Down
6 changes: 5 additions & 1 deletion install/aiostreams-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ $STD apt install -y \
build-essential \
python3 \
make \
g++
g++ \
libmimalloc3
msg_ok "Installed Dependencies"

NODE_VERSION="24" setup_nodejs
Expand Down Expand Up @@ -72,6 +73,8 @@ cat <<EOF >/opt/aiostreams/resources/metadata.json
EOF
msg_ok "Generated Version Metadata"

MIMALLOC_LIB=$(dpkg -L libmimalloc3 | grep -E '/libmimalloc\.so\.[0-9]+$' | head -1)

msg_info "Creating Service"
cat <<EOF >/etc/systemd/system/aiostreams.service
[Unit]
Expand All @@ -84,6 +87,7 @@ User=root
WorkingDirectory=/opt/aiostreams
EnvironmentFile=/opt/aiostreams/.env
Environment="NODE_OPTIONS=--max-semi-space-size=8 --expose-gc"
Environment="LD_PRELOAD=${MIMALLOC_LIB}"
ExecStart=/usr/bin/node /opt/aiostreams/packages/server/dist/server.js
Restart=on-failure
RestartSec=5
Expand Down
2 changes: 1 addition & 1 deletion json/aiostreams.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"type": "ct",
"updateable": true,
"privileged": false,
"architectures": ["amd64"],
"architectures": ["amd64", "arm64"],
"interface_port": 3000,
"documentation": "https://docs.aiostreams.viren070.me/",
"website": "https://github.com/Viren070/AIOStreams",
Comment thread
CrazyWolf13 marked this conversation as resolved.
Resolved
Expand Down