You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/user-manual.md
+13Lines changed: 13 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -839,6 +839,19 @@ It can also mean that you forgot to put `runtime.js` and `runtime.wasm` in the s
839
839
840
840
You put these files in a zip and upload it to [itch.io](https://itch.io) if you want.
841
841
842
+
# 🧩 Extending Vectarine with Plugins
843
+
844
+
Plugins are a way to add features to the vectarine editor and to your game. Plugins can add new interfaces in the editor, new luau functions, and do basically anything.
845
+
Because of this, running requires that you trust the author.
846
+
847
+
Plugins exist in the form of files with the `.vectaplugin` extension. Vectarine stores a list of trusted plugin that you can use in your games to a `plugin` folder that
848
+
you can open using the "Open plugin folder" in the "Plugin manager". When you download a plugin, you should add it to this folder.
849
+
850
+
Games have their own list of plugins in their `plugins` folder which should be next to the `game.vecta` file. For security reasons,
851
+
**the vectarine editor will only load plugins from a game if they are also in the `plugins` folder of the editor** and are thus trusted plugins!
852
+
853
+
If you want to make your own plugins, check the [README](https://github.com/vanyle/vectarine/tree/main/vectarine-plugin-template) of the vectarine plugin template on Github.
Copy file name to clipboardExpand all lines: vectarine-plugin-template/README.md
+14-13Lines changed: 14 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,24 +11,25 @@ Run it using `uv run bundle.py`.
11
11
12
12
You'll need to have [uv](https://github.com/astral-sh/uv) installed.
13
13
14
-
## Using your plugin
14
+
This will produce a `plugin.vectaplugin` file that you can copy to the `plugins` folder of the editor to use it.
15
15
16
-
Vectarine comes bundled with a runtime that is precompiled for all the major platforms.
17
-
For your plugins, you will need to manually compile them for the platforms you want to support.
16
+
## Distributing your plugin
18
17
19
-
If you don't have a Mac, you won't be able to support MacOS users for example.
18
+
To share your plugin, simply share the `your_plugin_name.vectaplugin` file.
20
19
21
-
## Distributing your plugin
20
+
## Platform support
21
+
22
+
Vectarine comes bundled with a runtime that is precompiled for all the major platforms.
23
+
However, as plugins contain native code, you will need to manually compile them for the platforms you want to support.
24
+
25
+
If you don't compile a Mac version of your plugin, games using it won't be able to run on Mac.
22
26
23
-
Vectarine can load plugins in 2 ways:
27
+
## Lua API
24
28
25
-
- From a local file
26
-
- From the plugin registry
29
+
If your plugin extends the Lua, you should provide inside `plugin.luau` a list of the function you define, with documentation comments and proper types.
27
30
28
-
Plugins can have 2 formats:
31
+
## Plugin capabilities
29
32
30
-
- Unpackage plugins are the main format for plugin developpers, it is just the path to the shared library with the plugin
31
-
- Package plugins are the format for end users, a zip file with the shared libraries with the different platforms an documentation.
33
+
As vectarine plugins are written in Rust, they can do pretty much anything, as long as the platform they are compiled for supports it.
32
34
33
-
If your plugin extends the Lua, you should provide a `luau-api` folder to document the APIs you provide as well as a `README.md` file
34
-
for a description of your plugin, an **examples** on how to use it.
35
+
Moreover, plugins use the SDK as a dependency to be able to access and create Luau functions for users.
0 commit comments