Language Support in Acode Plugins
One of the most frequent questions from developers is: "From how many languages can I create plugins for Acode?"
The short answer is: Any language that executes in or compiles to JavaScript or WebAssembly (.wasm).
Because Acode runs on an Android WebView sandbox (Chromium 90+), its execution environment supports modern ECMAScript, the DOM, Web Workers, and the full WebAssembly binary specification.
Here is the complete breakdown of languages you can use to build Acode plugins, categorized by their workflow integration:
1. First-Class Languages (Zero-Config in AcodeZ)
These languages are natively understood, compiled, and bundled by AcodeZ with zero extra tools or configuration required:
| Language | Extension | Description |
|---|---|---|
| TypeScript (Recommended) | .ts, .tsx | Fully typed with acode-plugin-types. Compiles in <30ms via Esbuild. |
| JavaScript | .js, .jsx, .mjs | Modern ES2020+ standards, async/await, ES modules, and DOM APIs. |
| SASS / SCSS | .scss, .sass | Compiled natively to CSS text and injected into the document head dynamically. |
When you run acodez init, you can scaffold either a TypeScript or JavaScript project immediately.
2. UI Frameworks & Component Dialects
Acode plugin UIs can be built with your favorite component framework:
React & Preact (.jsx, .tsx)
Esbuild has native JSX transform support built-in. You can use React or Preact to construct complex toolbars, sidebar panels, or modal dialogs:
import React from 'react';
import { createRoot } from 'react-dom/client';
export function renderPluginUI(container: HTMLElement) {
const root = createRoot(container);
root.render(<div className="my-plugin-panel">Hello from React!</div>);
}Vue & Svelte
You can write Vue single-file components (.vue) or Svelte components (.svelte) by adding their respective Esbuild plugins inside your acodez.config.js:
// acodez.config.js
import esbuildSvelte from 'esbuild-svelte';
export default {
plugins: [esbuildSvelte()],
};3. High-Performance Languages (via WebAssembly / Wasm)
Because Acode's Chromium 90+ WebView has full support for WebAssembly, you can write performance-critical logic in systems languages:
Rust (.rs ➔ .wasm)
Rust is the most popular choice for heavy Acode plugins, such as:
- AST parsers (e.g. Tree-sitter)
- Code formatters and linters
- Cryptography and Git clients (e.g.
libgit2or custom Wasm modules)
Compile your Rust crate with wasm-pack:
wasm-pack build --target webThen import and initialize the .wasm module in your plugin's init() function:
import init, { parse_code } from './pkg/my_rust_module.js';
await init();
const result = parse_code(editor.getValue());C / C++ (.c, .cpp ➔ .wasm)
Compiled via Emscripten (emcc). Commonly used to port existing C libraries (like SQLite, QuickJS, or libgit) to run directly inside Acode.
Zig (.zig ➔ .wasm)
Zig's standard compiler produces lightweight, freestanding WebAssembly binaries without any heavy runtime overhead:
zig build-lib -target wasm32-freestanding -dynamic plugin_core.zigGo & TinyGo (.go ➔ .wasm)
Using TinyGo produces compact Wasm binaries ideal for mobile plugins:
tinygo build -o core.wasm -target wasm main.goAssemblyScript (.ts ➔ .wasm)
If you want Wasm speed but prefer TypeScript syntax, AssemblyScript compiles strict TypeScript subsets directly to WebAssembly.
4. Transpiled & Alternate Languages
Any language with a compiler targeting JavaScript can run in Acode:
- Kotlin (Kotlin/JS): Build plugins using Kotlin and JetBrains' multiplatform tooling targeting JavaScript.
- Dart (Dart2JS): Compile Dart code to JavaScript.
- ClojureScript, PureScript, ReasonML / ReScript: Functional languages compiling cleanly to ES modules.
5. Embedded Scripting Engines (Python & Lua)
You can even execute Python or Lua code inside your plugin using WebAssembly-based interpreters:
- Python: Via Pyodide or MicroPython Wasm, allowing you to execute Python code or integrate Python language tools within Acode.
- Lua: Via Wasmoon or Fengari, embedding a full Lua 5.3/5.4 virtual machine inside JavaScript.
Summary: Which Should You Choose?
| Scenario | Recommended Choice |
|---|---|
| Standard plugins, themes, UI extensions | TypeScript with AcodeZ (default) |
| Quick scripts or lightweight utilities | JavaScript with AcodeZ |
| Complex reactive UI panels | Preact / React with JSX |
| Heavy parsing, encryption, AST processing | Rust compiled to WebAssembly |
| Porting legacy C/C++ libraries | C / C++ via Emscripten |