Use when creating or updating a Tabularis database driver plugin in Rust. Covers modern manifest fields, JSON-RPC over stdio, modular plugin layout, MySQL-level feature coverage targets, optional UI extensions, and validation against Tabularis repo rules.
Use this skill when building or updating a database plugin for Tabularis.
The skill is optimized for this repository. Follow AGENTS.md, the files in .rules/, and the current plugin-system behavior in src-tauri/src/plugins/ and src/types/plugins.ts.
main.rsPrefer this structure for a new plugin repository:
plugin-root/
├── Cargo.toml
├── manifest.json
├── README.md
├── src/
│ ├── main.rs
│ ├── rpc.rs
│ ├── client.rs
│ ├── error.rs
│ ├── models.rs
│ ├── handlers/
│ │ ├── mod.rs
│ │ ├── metadata.rs
│ │ ├── query.rs
│ │ ├── crud.rs
│ │ └── ddl.rs
│ └── utils/
│ ├── mod.rs
│ ├── identifiers.rs
│ ├── values.rs
│ ├── types.rs
│ └── pagination.rs
├── src/bin/
│ └── test_plugin.rs
└── tests/ # only if integration tests are worth the overhead
Keep src/main.rs thin. It should mostly parse requests, dispatch methods, and serialize responses.
plugins/manifest.schema.jsonsrc/types/plugins.tssrc-tauri/src/plugins/manager.rsplugins/PLUGIN_GUIDE.mdsrc-tauri/src/plugins/driver.rssrc-tauri/src/plugins/rpc.rssrc-tauri/src/drivers/mysql/mod.rssrc/hooks/useDrivers.tssrc/utils/connectionStringParser.tssrc/utils/driverCapabilities.tsDecide which capabilities are truly supported by the target database and driver library:
schemasviewsroutinesfile_basedfolder_basedconnection_stringconnection_string_exampleidentifier_quotealter_primary_keyalter_columncreate_foreign_keysmanage_tablesreadonlyno_connection_requiredDo not advertise support you cannot back with working handlers.
At minimum define:
idnameversiondescriptiondefault_portexecutablecapabilitiesdata_typesdefault_usernamecoloriconUse modern optional fields when useful:
settingsui_extensionsImplement the request loop in main.rs, but move logic out immediately:
rpc.rs: request parsing, success/error helpers, method routing supportclient.rs: connection config, client creation, pooling or reuse key logichandlers/metadata.rs: databases, schemas, tables, columns, indexes, foreign keys, views, routineshandlers/query.rs: test_connection, ping, execute_query, count_query, explain_query_plan if possiblehandlers/crud.rs: insert_record, update_record, delete_recordhandlers/ddl.rs: SQL generation helpers and DDL RPC methodsutils/*: quoting, escaping, value formatting, type normalization, pagination mathUse the built-in MySQL driver as the feature benchmark, not as text to copy.
For each feature area, classify it:
supported: implement fullypartially_supported: implement with explicit limitationsunsupported: return an accurate error or empty result as appropriatePrioritize these methods:
test_connectionget_databasesget_schemasget_tablesget_columnsget_foreign_keysget_indexesget_viewsget_view_definitionget_view_columnsget_routinesget_routine_parametersget_routine_definitionexecute_queryinsert_recordupdate_recorddelete_recordget_schema_snapshotget_all_columns_batchget_all_foreign_keys_batchget_create_table_sqlget_add_column_sqlget_alter_column_sqlget_create_index_sqlget_create_foreign_key_sqldrop_indexdrop_foreign_keyIf a method is not safe to emulate, fail explicitly instead of faking success.
Typical useful settings:
Keep settings in the manifest and resolve them in a dedicated config path, not inline in handlers.
Examples of good reasons:
Avoid UI extensions that only decorate the product without improving DB-specific workflows.
Always add unit tests for pure logic:
Prefer pure utility modules so tests stay fast and deterministic.
If the plugin includes a JSON-RPC smoke binary like src/bin/test_plugin.rs, use it to simulate Tabularis requests over stdio.
Before finishing:
cargo testcargo build --releasemanifest.json matches current Tabularis schema and capabilitiesmain.rsAGENTS.md requirements including GitNexus impact analysis before editing existing symbolspnpm for frontend-side validation in this repo and cargo for plugin validationmanage_tables or alter_column without implementing the related methods