Axeom vs. Hono
Comparing two pioneers of the universal web engine.
Hono and Axeom are both built for the Fetch API era. They are both runtime-agnostic and incredibly fast. However, Axeom distinguishes itself through its Flattened Hook System and Zero-CodeGen Type Safety which eliminates the need for complex internal middleware stacks.
Routing & Handlers
Both use Radix-Tree routers, but Axeom provides a more structured context object by default.
import from '@axeom/framework';
const = new ();
// Unified Context
.('/api', () => {
return "@axeom/framework";
});
import { } from 'hono';
const = new ();
// Context object 'c'
.get('/api', () => {
return .text("Hono");
});Validation & Type Safety
Hono requires external libraries like Zod and specific validator middleware. Axeom includes the s schema engine natively.
import , { } from '@axeom/framework';
const = new ();
// Native Registry-based safety
.('/user', ({ }) => {
return .;
}, {
: .({ : .() })
});
import { } from 'hono';
import { } from 'zod';
import { } from '@hono/zod-validator';
const = new ();
// Requires @hono/zod-validator
.get('/user',
('query', .object({ : .string() })),
() => {
const { } = .req.valid('query');
return .json({ });
}
);File Upload
Axeom provides high-level abstractions for file saving that work across all WinterTC runtimes.
import , { } from '@axeom/framework';
const = new ();
// Built-in cross-runtime saving
.('/upload', async () => {
const { } = .;
await .storage.save(, `data/${.}`);
return "OK";
}, { : .({ : .() }) });
import { } from 'hono';
const = new ();
// Manual buffer/stream handling
.post('/upload', async () => {
const = await .req.parseBody();
const = ['file'] as File;
const = await .();
// Manual FS calls required per runtime
return .text("OK");
});Lifecycle & Interceptors
Hono uses the standard "Onion" middleware pattern. Axeom uses a Flattened Hook Chain (onRequest, onResponse) and .derive().
import from '@axeom/framework';
const = new ();
// Derive: Typesafe context injection
.(async () => ({ : "@axeom/framework" }));
.('/', ({ }) => );
import { } from 'hono';
const = new ();
// Set/Get: Untyped context
.use('*', async (, ) => {
.set('user', 'hono');
await ();
});
.get('/', () => .get('user'));Encapsulation (Grouping)
Axeom groups are functional and preserve the isolated nature of interceptors.
import from '@axeom/framework';
const = new ();
// Clean prefixing
.('/admin', () => {
.('/dash', () => "OK");
});
import { } from 'hono';
const = new ();
// Route instance nesting
const = new ();
.get('/dash', () => .text("OK"));
.route('/admin', );Error Handling
Axeom's engine catches all errors in the flattened chain, providing a single point of truth for failure.
import from '@axeom/framework';
const = new ();
// Global rejection handling
.(() => {
// Global interceptor logic
});
// Automated async error catching
import { } from 'hono';
const = new ();
// Custom error handler
.onError((, ) => {
return .json({ : .message });
});OpenAPI & Documentation
Axeom's core engine is aware of your s schemas, allowing for zero-config Swagger generation. Hono requires a complete re-write of your routing logic using the OpenAPIHono class.
import from '@axeom/framework';
import { } from "@axeom/swagger";
const = new ();
// Fully automatic
.(());
import { , } from '@hono/zod-openapi';
const = new ();
.openapi(
({
: 'get',
: '/hello',
: { 200: { : { 'application/json': { : { : 'object' } } }, : 'OK' } },
}),
() => .json({ : 'hello' })
);Summary: Why Axeom Wins
| Feature | Hono | Axeom |
|---|---|---|
| Type Safety | Middleware + Zod | Native (Registry Pattern) |
| Performance | Onion Middleware | Flattened Hook Chain |
| Complexity | Middleware recursion | Linear Interceptors |
| Documentation | Separate Library | Native Plugin |
| File Saving | Manual per runtime | Native Universal Abstraction |