Skip to main content

Vibe Compiler

The Vibe Compiler validates generated code before execution, blocking dangerous patterns and enforcing security constraints. It’s used internally by VibeFrame but can also be used directly for pre-validation.

Usage

Configuration

Security Checks

Blocked Patterns

The compiler rejects code containing:

Import Validation

Only whitelisted imports are allowed:

Size Limits

Compiled Output

Pre-validation Pattern

Validate before saving to database:

API Integration

Caching

Compiled results are cached by code hash:

Custom Validation

Extend the compiler for additional checks:

Error Messages

The compiler provides detailed error messages:

Best Practices

1. Validate on Both Client and Server

2. Configure Imports for Your Use Case

3. Set Reasonable Size Limits