
Research
Namastex.ai npm Packages Hit with TeamPCP-Style CanisterWorm Malware
Malicious Namastex.ai npm packages appear to replicate TeamPCP-style Canister Worm tradecraft, including exfiltration and self-propagation.
The "Metal" of Web Frameworks
An ultra-high-performance web engine built for Bun, architected strictly for Mechanical Sympathy.
BareJS leads in complex, real-world scenarios. We measure engine efficiency using a stress test involving 10+ middlewares and deep radix tree routing to ensure performance holds under high concurrency.
| Framework | Latency | Speed |
|---|---|---|
| BareJS | 1.79 µs | Baseline |
| Elysia | 2.44 µs | 1.36x slower |
| Hono | 9.86 µs | 5.52x slower |
Last Updated: 2026-01-14 (github action)
[!TIP] **View our Continuous Benchmark Dashboard** for historical data and detailed performance trends.
Context objects via a circular buffer, drastically reducing GC pressure.bun add barejs
import { BareJS, type Context } from 'barejs';
const app = new BareJS();
// Enable Internal Logger
app.useLog(true);
app.get('/', (ctx: Context) => ctx.json({ hello: "world" }));
app.listen(3000);
BareJS v0.1.46 provides a fluent API for building responses.
app.get('/api/v1/health', (ctx: Context) => {
// Chainable status and standardized send helper
return ctx.status(200).send("System is healthy", {
uptime: process.uptime()
});
});
// Output: { "status": "success", "msg": "System is healthy", "uptime": ... }
import { bareAuth, createToken, Password, Hash, type Context } from 'barejs';
const SECRET = process.env.JWT_SECRET || "your-secret";
app.post('/register', async (ctx: Context) => {
const body = await ctx.jsonBody();
// High-performance Argon2id Hashing (64MB default)
const hash = await Password.make(body.password);
// Verify with ease
const isValid = await Hash.verify(body.password, hash);
if (isValid) {
const token = await createToken({ id: 1 }, SECRET);
return { token };
}
});
// Protect routes with built-in JWT middleware
app.get('/me', bareAuth(SECRET), (ctx: Context) => {
return ctx.send("Authenticated", { user: ctx.get('user') });
});
BareJS is the only engine that offers JIT-optimized validation paths.
import { typebox, zod, native, t, type Context } from 'barejs';
import { z } from 'zod';
// Style A: TypeBox (JIT Optimized - Recommended)
// Pre-compiled validation to outperform competitors by 55%
const Schema = t.Object({ name: t.String() });
app.post('/user', typebox(Schema), (ctx) => ctx.json(ctx.body));
// Style B: Zod (Industry Standard)
const ZodSchema = z.object({ age: z.number() });
app.post('/age', zod(ZodSchema), (ctx) => ctx.json(ctx.body));
// Style C: Native (Zero Dependency - Simple Checks)
app.post('/native', native({ properties: { id: { type: 'number' } } }), (ctx) => ctx.json(ctx.body));
import { cors, staticFile } from 'barejs';
app.use(cors());
app.use(staticFile("public"));
| Method / Property | Description |
|---|---|
ctx.req | Raw incoming Bun Request object. |
ctx.params | Route parameters (e.g., :id). |
ctx.jsonBody() | [Async] Parses and caches JSON body for performance. |
ctx.status(code) | Sets the HTTP status code (Chainable). |
ctx.send(msg, ext) | Returns a standardized JSON response. |
ctx.json(data) | Returns an optimized raw JSON response. |
ctx.setHeader(k, v) | Sets a response header. |
ctx.set / ctx.get | Manual storage within the request lifecycle. |
| OS Variable / File | Default | Description |
|---|---|---|
bare.config.ts | - | Centralized config for Port and Hash algorithms. |
BARE_POOL_SIZE | 1024 | Context pool size (Must be Power of 2). |
NODE_ENV | development | Set to production to enable peak JIT optimizations. |
Maintained by xarhang | License: MIT
FAQs
High-performance JIT-specialized web framework for Bun
The npm package barejs receives a total of 179 weekly downloads. As such, barejs popularity was classified as not popular.
We found that barejs demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
Malicious Namastex.ai npm packages appear to replicate TeamPCP-style Canister Worm tradecraft, including exfiltration and self-propagation.

Product
Explore exportable charts for vulnerabilities, dependencies, and usage with Reports, Socket’s new extensible reporting framework.

Product
Socket for Jira lets teams turn alerts into Jira tickets with manual creation, automated ticketing rules, and two-way sync.