r/javascript • • Jun 06 '26

Obscura — a Rust port of javascript-obfuscator. 100% feature parity, ~700× faster

Thumbnail
github.com
25 Upvotes

I rewrote javascript-obfuscator in Rust because it was the slowest step in our build. Shipping v0.1.0 today.

Repo: https://github.com/Crash0v3rrid3/obscura

Release: https://github.com/Crash0v3rrid3/obscura/releases/tag/v0.1.0

What it does: Drop-in obfuscator. Same options, same output behavior, same CLI flags. All 21 upstream transforms — string array (with base64/RC4 + rotation/shuffle/index-shift/calls-transform/wrappers), control flow flattening, dead code injection, identifier + property renaming, self-defending, debug protection, domain lock, source maps, the lot.

Speed (heavy preset, single thread):

FileSizeUpstreamObscuraSpeedup
d3.min.js273K193.9s98ms1977×
vue.min.js141K28.6s32ms900×
jquery86K12.1s17ms705×
lodash71K14.5s21ms692×
moment58K8.6s16ms529×
react11K2.0s15ms130×

Median ~700×. CLI also parallelizes directory mode with rayon.

How it stays correct: 321-test conformance suite runs every obfuscated output through vm.runInNewContext to verify behavioral parity with the input. Determinism contract: same (source, options, seed) → byte-identical output across runs (ChaCha20Rng, no wall clock).

Stack: oxc for parse/semantic/codegen, napi-rs for the Node addon, wasm-bindgen for the browser build. Library is #![forbid(unsafe_code)], zero unwrap in core (clippy-enforced).

Surfaces shipped:

- cargo install obscura-cli — or grab a binary (macOS arm64/x64, Linux gnu+musl arm64/x64, Windows x64)

- npm package with prebuilt napi addons (macOS + Linux glibc)

- WASM (web + nodejs targets)

Not yet: the injected helper templates (self-defending etc.) ship un-re-obfuscated, renamePropertiesMode=unsafe, and ignoreImports. Tracked in docs/TASKS.md. PRs welcome.

Feedback / bug reports / "this output breaks my code" issues very much wanted — the conformance suite catches a lot but real bundles will surface things it can't.


r/javascript • • Mar 06 '23

Were React Hooks a Mistake?

Thumbnail
jakelazaroff.com
7 Upvotes

r/javascript • • Jun 02 '25

I was on the Changelog!

Thumbnail
changelog.com
0 Upvotes

r/javascript • • Apr 23 '25

Package that bumps package.json semver notation to real installed version

Thumbnail
npmjs.com
0 Upvotes

I was often annoyed when package.json lists smth like "^6.0.0", you do "npm updated", versions are increased, but it still shows "6.0.0", and in order to read relevant changelogs of libraries you would have to manually find out what are the REAL installed versions. And package-lock is not that human-friednly, TBH. I created small tool that aligns package.json with ACTUAL versions of your dependencies, while keeping semver.
For example: ^6.0.0 -> ^6.2.1
Small think, but maybe someone will find it useful to keep package.json more transparent and make it reflect actual state of your dependencies as well
https://www.npmjs.com/package/align-deps-vers


r/javascript • • Jul 16 '25

Build your website with server rendered JSX without any hydration headaches - improved Jeasx quickstart template to get you started more easily

Thumbnail jeasx.dev
0 Upvotes

Jeasx combines the developer experience of asynchronous JSX with the proven benefits of server-side rendering, resulting in a robust and streamlined web development approach.

To get you started more easily, a much improved quickstart template is available now.


r/javascript • • May 01 '23

AskJS [AskJS] What's the deal with the fetch API?

0 Upvotes

So, for every fetch we have this:

fetch(`some_URL`) 
    .then(function(response){ 
        return response.text(); 
    }) 
    .then(function(retval){ 
        // do something - or not - with retval, but in any case, we're done. 
    });

It's my understanding that the first .then promise is necessary and the whole thing doesn't work unless it's there. So my question is, why isn't it built in? Why does it have to be explicitly called? Is there anything else it can do besides return the response contents?

Seems a little clunky to me.


r/javascript • • Apr 29 '24

BunyJS: Another IoC but a framework this time.

Thumbnail bunyjs.com
0 Upvotes

r/javascript • • Jan 13 '14

How to create Singleton objects in JavaScript

Thumbnail
viralpatel.net
0 Upvotes

r/javascript • • Feb 06 '14

The Dangers of JavaScript Frameworks, Libraries and Plugins

Thumbnail
coderslexicon.com
0 Upvotes

r/javascript • • Feb 23 '17

What's the difference between using "let" and "var" to declare a variable? 👍

Thumbnail
stackoverflow.com
0 Upvotes

r/javascript • • Oct 07 '19

8 Simple Tricks for Junior and Senior Developers to Speed Up Development

Thumbnail
medium.com
0 Upvotes

r/javascript • • May 22 '22

Save and Load Tensorflow & Keras Models

Thumbnail
onepagecode.substack.com
0 Upvotes

r/javascript • • Aug 13 '22

I built a To-do List web app

Thumbnail somtojf.github.io
0 Upvotes

r/javascript • • Feb 16 '15

Zen JavaScript, or why should your code be as easy to read as Harry Potter

Thumbnail
medium.com
0 Upvotes

r/javascript • • Sep 17 '21

Easily Create your own NPM Card!

Thumbnail
github.com
0 Upvotes

r/javascript • • Sep 25 '21

AskJS [AskJS] Can we make good project wihout Framwork?

0 Upvotes

I wonder if we can do that because I always see JavaScript as Cutting-edge release always learning framwork etc...

I would love see your only JavaScript project in GitHub !


r/javascript • • Apr 14 '19

How I wrote Javascript Framework

Thumbnail
medium.com
0 Upvotes

r/javascript • • Jun 21 '14

Yobot - node.js library for creating bots on the new Yo app

Thumbnail
github.com
0 Upvotes

r/javascript • • Jun 24 '18

help Any v8 devs here? Got a cool thing we can do

0 Upvotes

So I wanted threads in node.js and javascript in general for a long time and today I finally decided to give it a shot and code it myself. I read the c++ addon api for node.js and started out and it was going good. But when I run the callback function by spawning a new thread it gives me segfault. I used valgrind and tried to fix it the entire day but having no prior experience in v8 until today everything seems foreign. I have the code MIT licensed at https://github.com/teja42/node-threads . So if you're have some experience in v8 engine we could collaborate and make threads a thing in node.js cause I'm sick of spawing a seperate process.

Update : NVM it's already in development. It's been added recently and I was not aware of that.


r/javascript • • Jan 17 '25

Welcome to the RadixVerse

Thumbnail
github.com
0 Upvotes

r/javascript • • Aug 12 '24

usBabyNames.js: historical data on US names 1880-2023

Thumbnail
github.com
0 Upvotes

r/javascript • • Feb 21 '21

PHP 8 features I wish also existed in JavaScript

Thumbnail
dev.to
0 Upvotes

r/javascript • • Jul 08 '11

Building Epic Win With Backbone.js

Thumbnail
codethinked.com
0 Upvotes