Open-source alternative of Discord desktop's app.asar
Go to file
CanadaHonk 51f3634a3c
[Readme] Add find asar step to install guide
2021-12-13 10:08:46 +00:00
.github/workflows [CI] Don't mark as pre-release so GitHub recommends 2021-12-11 20:10:49 +00:00
polyfills [Polyfills > mkdirp] Convert to new polyfill system instead of in utils 2021-12-11 11:08:35 +00:00
src [FirstRun > win32] Fix using wrong named var causing error 2021-12-13 09:56:37 +00:00
.gitignore [Gitignore] More specific package-lock.json ignore 2021-12-10 19:54:50 +00:00
LICENSE Initial commit 2021-12-09 11:14:14 +00:00
README.md [Readme] Add find asar step to install guide 2021-12-13 10:08:46 +00:00
changelog.md [Changelog] Tweak v0.3 2021-12-11 20:46:14 +00:00
faq.md [FAQ] Initial Add 2021-12-13 07:23:50 +00:00
injectPolyfills.js [Polyfills] Rewrite 2021-12-11 00:45:56 +00:00
roadmap.md [Roadmap] Mark auto start as complete 2021-12-13 08:41:13 +00:00
strip.js [CI] Strip via JS file, simpler yaml 2021-12-11 18:21:59 +00:00
test.sh [Polyfills] Rewrite 2021-12-11 00:45:56 +00:00

README.md

OpenAsar

An experimental open-source alternative of Discord desktop's app.asar

Features

  • 🚀 Speed: ~2x faster startup times (up to ~4x with experimental config)
  • 🪶 Lightweight: <2% of Discord's original size (9mb -> ~150kb)
  • ⚙️ Configurable: Adds many config options for Discord and OpenAsar enhancements (see config section)
  • 🔌 Hotpluggable: Replace one file and it's installed, that's it
  • 🛡️ No Tracking: Removes Discord's built-in tracking for crashes and errors
  • 🪡 Patching: A future platform for custom patches to further enhance

🧪 Experimental

OpenAsar is mostly stable, but still lacks a few minor features and likely has a few possible issues. Crashes are unlikely.

FAQ


Install Guide

OpenAsar is not 100% recommened due to it being experimental.

  1. Download latest nightly release
  2. Find your app.asar, it should be <where the Discord exe is>/resources/app.asar. For Windows this is like: %localappdata%\Discord\app-1.0.9003\resources\app.asar (your app folder may have a different version)
  3. Backup your original app.asar (rename to app.asar.backup / etc)
  4. Install OpenAsar app.asar into the original path (you may need to be root on Linux)
  5. Restart Discord via system tray (you should notice Discord start faster as a way to see if it's instantly working)

Config

You can configure OpenAsar via settings.json (found in your Discord app data / user data), under a openasar object. Keep in mind most options are defaults for good reason. The avaliable options are:

  • quickstart (bool, default false) - whether to use Quickstart (experimental)
  • skipStartupUpdateChecks (bool, default false) - skips startup update checking (Linux-only)
  • autoupdate (bool, default true) - whether to autoupdate OpenAsar after Discord startup
  • multiInstance (bool, default false) - whether to enable multi-instance
  • ssoeAllowlist (bool, default true) - whether to use safer custom method of opening external urls (true) or normal Discord's method (false)

An example of a settings.json with OpenAsar config:

{
  "BACKGROUND_COLOR": "#202225",
  "IS_MAXIMIZED": false,
  "IS_MINIMIZED": false,
  "WINDOW_BOUNDS": {
    "x": 801,
    "y": 22,
    "width": 797,
    "height": 876
  },
  "MINIMIZE_TO_TRAY": false,
  "OPEN_ON_STARTUP": false,
  "openasar": {
    "quickstart": true
  }
}

Additionally there are some environmental variables you can use:

  • OPENASAR_QUICKSTART (bool, default false) - same as quickstart config option
  • OPENASAR_NOSTART (bool, default false) - if enabled halts starting after splash loads (for splash testing)