> ## Documentation Index
> Fetch the complete documentation index at: https://villagesql.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Extensions or Plugins and Components

> When to build a VEF extension versus using MySQL's native plugin or component interfaces.

VillageSQL is a tracking fork of MySQL and is a drop-in replacement. The MySQL plugin and component interfaces work with VillageSQL just like they do with MySQL. VillageSQL provides the VillageSQL Extension Framework (VEF). For adding new functionality — custom SQL functions, custom types, integrations, etc. — VEF extensions are the right model.

## What Goes Where

If you're building something new, build a VEF extension in your own repo. Plugins and components work, but VEF is the right model — see [Why Extensions instead of Plugins and Components](#why-extensions-instead-of-plugins-and-components).

Contributions that belong in the VillageSQL Server repo:

|                                                               |                                                                                   |
| ------------------------------------------------------------- | --------------------------------------------------------------------------------- |
| Improvements to VEF itself (new hook types, SDK capabilities) | PR to the [server repo](https://github.com/villagesql/villagesql-server)          |
| Server bug fixes                                              | Issue or PR in the [server repo](https://github.com/villagesql/villagesql-server) |

## Why Extensions instead of Plugins and Components

MySQL plugins and components will work in VillageSQL. VEF extensions get more:

* **Custom types** — define new column types, which plugins and UDFs can't do
* **Packaging** — distributed as `.veb` files, installed with `INSTALL EXTENSION`
* **No restart required** — extensions load and unload at runtime
* **Versioning** — declared in the extension manifest, enforced by the server

## Starting a New Extension

VEF has two SDKs, both registering through the same framework:

* **C++** — [vsql-extension-template](https://github.com/villagesql/vsql-extension-template) is the starting point. Walk through [Creating Extensions in C++](/mysql-8.4/0.0.5/create).
* **Rust** — [vsql-extension-template-rust](https://github.com/villagesql/vsql-extension-template-rust) is the starting point. Walk through [Creating Extensions in Rust](/mysql-8.4/0.0.5/rust-sdk).

The C++ SDK is more complete today (aggregates, prerun, varargs, system and status variables, keyring, column storage); the Rust SDK covers function-only extensions and custom types.

## If VEF Doesn't Support What You Need

VEF is still growing. If you need a hook or capability that isn't there yet:

* **File an issue** in the [server repo](https://github.com/villagesql/villagesql-server/issues) describing what you need
* **Upvote an existing issue** if the request is already there
* **Submit a PR** adding the hook to VEF — framework improvements are welcome in the server repo
