barejs 0.1.47 โ 0.1.49
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +20 -20
- package/README.md +221 -184
- package/dist/index.js +122 -187
- package/dist/types/client/index.d.ts +48 -0
- package/dist/types/core/bare.d.ts +14 -1
- package/dist/types/core/context.d.ts +9 -1
- package/dist/types/core/router.d.ts +1 -0
- package/dist/types/index.d.ts +6 -2
- package/dist/types/security/auth.d.ts +2 -2
- package/dist/types/security/headers.d.ts +9 -0
- package/dist/types/security/rateLimit.d.ts +9 -0
- package/dist/types/utils/openapi.d.ts +15 -0
- package/package.json +68 -68
- package/src/client/index.ts +121 -0
- package/src/core/bare.ts +463 -318
- package/src/core/config.ts +31 -31
- package/src/core/context.ts +205 -111
- package/src/core/loader.ts +12 -12
- package/src/core/radix.ts +184 -171
- package/src/core/router.ts +61 -62
- package/src/index.ts +73 -61
- package/src/security/auth.ts +174 -153
- package/src/security/cors.ts +45 -26
- package/src/security/hash.ts +22 -19
- package/src/security/headers.ts +59 -0
- package/src/security/rateLimit.ts +76 -0
- package/src/security/validators.ts +137 -133
- package/src/utils/openapi.ts +116 -0
- package/src/utils/static.ts +42 -25
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 xarhang
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 xarhang
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
21
|
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,184 +1,221 @@
|
|
|
1
|
-
<div align="center">
|
|
2
|
-
<br />
|
|
3
|
-
<h1>Bare<span style="color: #F7DF1E;">JS</span></h1>
|
|
4
|
-
<p><strong>The "Metal" of Web Frameworks</strong></p>
|
|
5
|
-
<p><i>An ultra-high-performance web engine built for Bun, architected strictly for Mechanical Sympathy.</i></p>
|
|
6
|
-
|
|
7
|
-
<p>
|
|
8
|
-
<a href="https://www.npmjs.com/package/barejs">
|
|
9
|
-
<img src="https://img.shields.io/npm/v/barejs?style=for-the-badge&logo=npm&color=CB3837" alt="NPM Version">
|
|
10
|
-
</a>
|
|
11
|
-
<a href="https://github.com/xarhang/barejs/actions/workflows/bench.yml">
|
|
12
|
-
<img src="https://img.shields.io/github/actions/workflow/status/xarhang/barejs/bench.yml?branch=main&label=Performance&style=for-the-badge&logo=github" alt="Performance">
|
|
13
|
-
</a>
|
|
14
|
-
<a href="https://bun.sh">
|
|
15
|
-
<img src="https://img.shields.io/badge/Bun-%3E%3D1.0.0-black?style=for-the-badge&logo=bun" alt="Bun Version">
|
|
16
|
-
</a>
|
|
17
|
-
<a href="https://github.com/xarhang/barejs/blob/main/LICENSE">
|
|
18
|
-
<img src="https://img.shields.io/github/license/xarhang/barejs?style=for-the-badge&color=blue" alt="License">
|
|
19
|
-
</a>
|
|
20
|
-
</p>
|
|
21
|
-
</div>
|
|
22
|
-
|
|
23
|
-
---
|
|
24
|
-
|
|
25
|
-
</div>
|
|
26
|
-
|
|
27
|
-
## ๐ Benchmarks: Real-World Performance
|
|
28
|
-
|
|
29
|
-
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.
|
|
30
|
-
<!-- MARKER: PERFORMANCE_TABLE_START -->
|
|
31
|
-
|
|
32
|
-
| Framework | Latency | Speed |
|
|
33
|
-
| :--- | :--- | :--- |
|
|
34
|
-
| **BareJS** | **
|
|
35
|
-
| Elysia |
|
|
36
|
-
| Hono |
|
|
37
|
-
|
|
38
|
-
> Last Updated: 2026-
|
|
39
|
-
|
|
40
|
-
<!-- MARKER: PERFORMANCE_TABLE_END -->
|
|
41
|
-
|
|
42
|
-
> [!TIP]
|
|
43
|
-
> **View our [Continuous Benchmark Dashboard**](https://xarhang.github.io/bareJS/dev/benchmarks/) for historical data and detailed performance trends.
|
|
44
|
-
|
|
45
|
-
## ๐ Key Features
|
|
46
|
-
|
|
47
|
-
* **JIT Pipeline Compilation**: Routes and middleware chains are flattened into a single function at runtime.
|
|
48
|
-
* **Object Pooling**: Recycles `Context` objects via a
|
|
49
|
-
* **Internal High-Performance Logger**: Zero-overhead logging integrated directly into the JIT engine.
|
|
50
|
-
* **Precise Radix Router**:
|
|
51
|
-
* **
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
---
|
|
77
|
-
|
|
78
|
-
## ๐ Comprehensive Guide
|
|
79
|
-
|
|
80
|
-
### 1. โก Standardized Response &
|
|
81
|
-
|
|
82
|
-
BareJS v0.1.
|
|
83
|
-
|
|
84
|
-
```typescript
|
|
85
|
-
app.
|
|
86
|
-
|
|
87
|
-
return
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
});
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
app.post('/
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
1
|
+
<div align="center">
|
|
2
|
+
<br />
|
|
3
|
+
<h1>Bare<span style="color: #F7DF1E;">JS</span></h1>
|
|
4
|
+
<p><strong>The "Metal" of Web Frameworks</strong></p>
|
|
5
|
+
<p><i>An ultra-high-performance web engine built for Bun, architected strictly for Mechanical Sympathy.</i></p>
|
|
6
|
+
|
|
7
|
+
<p>
|
|
8
|
+
<a href="https://www.npmjs.com/package/barejs">
|
|
9
|
+
<img src="https://img.shields.io/npm/v/barejs?style=for-the-badge&logo=npm&color=CB3837" alt="NPM Version">
|
|
10
|
+
</a>
|
|
11
|
+
<a href="https://github.com/xarhang/barejs/actions/workflows/bench.yml">
|
|
12
|
+
<img src="https://img.shields.io/github/actions/workflow/status/xarhang/barejs/bench.yml?branch=main&label=Performance&style=for-the-badge&logo=github" alt="Performance">
|
|
13
|
+
</a>
|
|
14
|
+
<a href="https://bun.sh">
|
|
15
|
+
<img src="https://img.shields.io/badge/Bun-%3E%3D1.0.0-black?style=for-the-badge&logo=bun" alt="Bun Version">
|
|
16
|
+
</a>
|
|
17
|
+
<a href="https://github.com/xarhang/barejs/blob/main/LICENSE">
|
|
18
|
+
<img src="https://img.shields.io/github/license/xarhang/barejs?style=for-the-badge&color=blue" alt="License">
|
|
19
|
+
</a>
|
|
20
|
+
</p>
|
|
21
|
+
</div>
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
</div>
|
|
26
|
+
|
|
27
|
+
## ๐ Benchmarks: Real-World Performance
|
|
28
|
+
|
|
29
|
+
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.
|
|
30
|
+
<!-- MARKER: PERFORMANCE_TABLE_START -->
|
|
31
|
+
|
|
32
|
+
| Framework | Latency | Speed |
|
|
33
|
+
| :--- | :--- | :--- |
|
|
34
|
+
| **BareJS** | **0.85 ยตs** | **Baseline** |
|
|
35
|
+
| Elysia | 1.30 ยตs | 1.52x slower |
|
|
36
|
+
| Hono | 5.00 ยตs | 5.88x slower |
|
|
37
|
+
|
|
38
|
+
> Last Updated: 2026-11-17 (github action)
|
|
39
|
+
|
|
40
|
+
<!-- MARKER: PERFORMANCE_TABLE_END -->
|
|
41
|
+
|
|
42
|
+
> [!TIP]
|
|
43
|
+
> **View our [Continuous Benchmark Dashboard**](https://xarhang.github.io/bareJS/dev/benchmarks/) for historical data and detailed performance trends.
|
|
44
|
+
|
|
45
|
+
## ๐ Key Features
|
|
46
|
+
|
|
47
|
+
* **JIT Pipeline Compilation**: Routes and middleware chains are flattened into a single function at runtime.
|
|
48
|
+
* **Concurrency-Safe Object Pooling**: Recycles `Context` objects via a free-list stack, drastically reducing GC pressure with zero cross-request leakage.
|
|
49
|
+
* **Internal High-Performance Logger**: Zero-overhead logging integrated directly into the JIT engine.
|
|
50
|
+
* **Precise Radix Router**: Optimized segment matching for deep-nested paths and lazy query parsing (`ctx.query`).
|
|
51
|
+
* **Real-Time & RPC Ready**: Built-in **Native WebSocket (`app.ws`)**, **SSE (`ctx.sse`)**, **JSON-RPC 2.0 (`app.rpc`)**, and **Type-Safe `bareClient`**.
|
|
52
|
+
* **AOT OpenAPI 3.1 Docs**: Zero-runtime-cost `app.docs()` with Scalar UI generated from TypeBox, Zod, and Native schemas.
|
|
53
|
+
* **Mechanical Sympathy**: Intentionally designed to align with JSC/V8 optimization and Bun's I/O.
|
|
54
|
+
|
|
55
|
+
## ๐ ๏ธ Installation
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
bun add barejs
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### The "Bare" Minimum
|
|
62
|
+
|
|
63
|
+
```typescript
|
|
64
|
+
import { BareJS, type Context } from 'barejs';
|
|
65
|
+
|
|
66
|
+
const app = new BareJS();
|
|
67
|
+
|
|
68
|
+
// Enable Internal Logger
|
|
69
|
+
app.useLog(true);
|
|
70
|
+
|
|
71
|
+
app.get('/', (ctx: Context) => ctx.json({ hello: "world" }));
|
|
72
|
+
|
|
73
|
+
app.listen(3000);
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
## ๐ Comprehensive Guide
|
|
79
|
+
|
|
80
|
+
### 1. โก Standardized Response, Lazy Query & Error Hook
|
|
81
|
+
|
|
82
|
+
BareJS v0.1.49 provides a fluent API for responses, lazy query parsing, and centralized error handling.
|
|
83
|
+
|
|
84
|
+
```typescript
|
|
85
|
+
app.onError((err, ctx) => {
|
|
86
|
+
ctx.status(500);
|
|
87
|
+
return { status: "error", message: err.message };
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
app.get('/api/v1/health', (ctx: Context) => {
|
|
91
|
+
const verbose = ctx.getQuery('verbose'); // Lazy-parsed only when accessed
|
|
92
|
+
return ctx.status(200).send("System is healthy", {
|
|
93
|
+
verbose: verbose === 'true',
|
|
94
|
+
uptime: process.uptime()
|
|
95
|
+
});
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
// Output: { "status": "success", "msg": "System is healthy", "verbose": ..., "uptime": ... }
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
### 2. ๐ก๏ธ Security & Authentication (Dual-API)
|
|
102
|
+
|
|
103
|
+
```typescript
|
|
104
|
+
import { bareAuth, createToken, basicAuth, hasRole, Password, Hash, type Context } from 'barejs';
|
|
105
|
+
|
|
106
|
+
const SECRET = process.env.JWT_SECRET || "your-secret";
|
|
107
|
+
|
|
108
|
+
app.post('/register', async (ctx: Context) => {
|
|
109
|
+
const body = await ctx.jsonBody();
|
|
110
|
+
|
|
111
|
+
// High-performance Argon2id Hashing (64MB default)
|
|
112
|
+
const hash = await Password.make(body.password);
|
|
113
|
+
|
|
114
|
+
// Verify with ease
|
|
115
|
+
const isValid = await Hash.verify(body.password, hash);
|
|
116
|
+
|
|
117
|
+
if (isValid) {
|
|
118
|
+
const token = await createToken({ id: 1, role: 'admin' }, SECRET);
|
|
119
|
+
return { token };
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
// Protect routes with constant-time JWT middleware & RBAC
|
|
124
|
+
app.get('/me', bareAuth(SECRET), hasRole('admin'), (ctx: Context) => {
|
|
125
|
+
return ctx.send("Authenticated", { user: ctx.get('user') });
|
|
126
|
+
});
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
### 3. โ
Data Validation (3 Styles)
|
|
130
|
+
|
|
131
|
+
BareJS is the only engine that offers JIT-optimized validation paths.
|
|
132
|
+
|
|
133
|
+
```typescript
|
|
134
|
+
import { typebox, zod, native, t, type Context } from 'barejs';
|
|
135
|
+
import { z } from 'zod';
|
|
136
|
+
|
|
137
|
+
// Style A: TypeBox (JIT Optimized - Recommended)
|
|
138
|
+
const Schema = t.Object({ name: t.String() });
|
|
139
|
+
app.post('/user', typebox(Schema), (ctx) => ctx.json(ctx.body));
|
|
140
|
+
|
|
141
|
+
// Style B: Zod (Industry Standard)
|
|
142
|
+
const ZodSchema = z.object({ age: z.number() });
|
|
143
|
+
app.post('/age', zod(ZodSchema), (ctx) => ctx.json(ctx.body));
|
|
144
|
+
|
|
145
|
+
// Style C: Native (Zero Dependency - Simple Checks)
|
|
146
|
+
app.post('/native', native({ properties: { id: { type: 'number' } } }), (ctx) => ctx.json(ctx.body));
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
### 4. ๐ Essential Production Middleware
|
|
150
|
+
|
|
151
|
+
```typescript
|
|
152
|
+
import { cors, rateLimit, securityHeaders, staticFile } from 'barejs';
|
|
153
|
+
|
|
154
|
+
app.use(securityHeaders());
|
|
155
|
+
app.use(cors({ origin: 'https://example.com' }));
|
|
156
|
+
app.use(rateLimit({ windowMs: 60_000, max: 100 }));
|
|
157
|
+
app.use(staticFile("public"));
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
### 5. ๐ก Real-Time (WebSocket, SSE), OpenAPI & RPC
|
|
161
|
+
|
|
162
|
+
```typescript
|
|
163
|
+
import { BareJS, bareClient } from 'barejs';
|
|
164
|
+
|
|
165
|
+
const app = new BareJS();
|
|
166
|
+
|
|
167
|
+
// Native Bun WebSocket
|
|
168
|
+
app.ws('/ws/chat', {
|
|
169
|
+
open: (ws) => ws.send('connected'),
|
|
170
|
+
message: (ws, msg) => ws.send(`echo: ${msg}`)
|
|
171
|
+
});
|
|
172
|
+
|
|
173
|
+
// Server-Sent Events (SSE)
|
|
174
|
+
app.get('/events', (ctx) => ctx.sse(async (send) => {
|
|
175
|
+
send({ step: 1, msg: 'streaming...' }, 'progress', '1');
|
|
176
|
+
}));
|
|
177
|
+
|
|
178
|
+
// JSON-RPC 2.0 Endpoint (single & batch)
|
|
179
|
+
app.rpc('/rpc', {
|
|
180
|
+
add: ({ a, b }: { a: number; b: number }) => a + b
|
|
181
|
+
});
|
|
182
|
+
|
|
183
|
+
// Auto OpenAPI 3.1 Spec (/docs/json) + Scalar UI (/docs)
|
|
184
|
+
app.docs('/docs', { title: 'My BareJS API', version: '1.0.0' });
|
|
185
|
+
|
|
186
|
+
// Type-Safe HTTP RPC Client
|
|
187
|
+
const client = bareClient('http://localhost:3000');
|
|
188
|
+
const user = await client.get('/users/:id', { params: { id: 42 }, query: { full: true } });
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
---
|
|
192
|
+
|
|
193
|
+
## ๐ง Context API
|
|
194
|
+
|
|
195
|
+
| Method / Property | Description |
|
|
196
|
+
| --- | --- |
|
|
197
|
+
| `ctx.req` | Raw incoming Bun `Request` object. |
|
|
198
|
+
| `ctx.params` | Route parameters (e.g., `:id`). |
|
|
199
|
+
| `ctx.query` | **Lazy** parsed query parameters object. |
|
|
200
|
+
| `ctx.getQuery(key)` | Returns a single query parameter value lazily. |
|
|
201
|
+
| `ctx.jsonBody()` | **[Async]** Parses and caches JSON body for performance. |
|
|
202
|
+
| `ctx.status(code)` | Sets the HTTP status code (**Chainable**). |
|
|
203
|
+
| `ctx.send(msg, ext)` | Returns a standardized JSON response. |
|
|
204
|
+
| `ctx.json(data)` | Returns an optimized raw JSON response. |
|
|
205
|
+
| `ctx.sse(source)` | Streams Server-Sent Events (`text/event-stream`). |
|
|
206
|
+
| `ctx.setHeader(k, v)` | Sets a response header. |
|
|
207
|
+
| `ctx.set / ctx.get` | Manual storage within the request lifecycle. |
|
|
208
|
+
|
|
209
|
+
---
|
|
210
|
+
|
|
211
|
+
## โ๏ธ Performance Tuning
|
|
212
|
+
|
|
213
|
+
| OS Variable / File | Default | Description |
|
|
214
|
+
| --- | --- | --- |
|
|
215
|
+
| `bare.config.ts` | - | Centralized config for Port and Hash algorithms. |
|
|
216
|
+
| `BARE_POOL_SIZE` | `1024` | Context pool size (**Must be Power of 2**). |
|
|
217
|
+
| `NODE_ENV` | `development` | Set to `production` to enable peak JIT optimizations. |
|
|
218
|
+
|
|
219
|
+
---
|
|
220
|
+
|
|
221
|
+
**Maintained by [xarhang](https://github.com/xarhang) | License: MIT**
|