Skip to content

Conversation

@lunny
Copy link
Member

@lunny lunny commented Dec 6, 2025

Resolve #34917

  • Render plugins list
image
  • Render plugin view
image
  • Render plugin example
image
  • Render wasm plugin example
image

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Dec 6, 2025
@wxiaoguang
Copy link
Contributor

Don't understand why wasm is introduced and becomes a must.

It's highly likely a wrong design: when you have a hammer, then everything in your eyes become nails.

@silverwind
Copy link
Member

silverwind commented Dec 6, 2025

I'm still of the opinion that plugins should be npm packages with a package.json that declares their metadata and dependencies. I don't think it's good to create a new manifest.json file format when the package.json format already has most of what you need.

The big benefit of being a npm package is that these plugins can be puplished to the npm registry so be installed from there or a local folder.

Take for example VSCode extensions, those are also npm packages at their core, with additional package.json properties specific to extensions.

@silverwind
Copy link
Member

silverwind commented Dec 6, 2025

Don't understand why wasm is introduced and becomes a must.

WASM support is nice, but it should not be required. The entry point to a plugin should be JS function, and whether the plugin than loads a WASM module or not is the plugin's decision.

@wxiaoguang
Copy link
Contributor

wxiaoguang commented Dec 6, 2025

I'm still of the opinion that plugins should be npm packages with a package.json that declares their metadata and dependencies.


Don't understand why wasm is introduced and becomes a must.

WASM support is nice, but it should not be required. The entry point to a plugin should be JS function, and whether the plugin than loads a WASM module or not is the plugin's decision.

WASM is definitely a new abuse here, unless it could prove that it brings real benefits.

@lunny
Copy link
Member Author

lunny commented Dec 6, 2025

Don't understand why wasm is introduced and becomes a must.

It's highly likely a wrong design: when you have a hammer, then everything in your eyes become nails.

It's just an example. There is no special code to support wasm. It's a nature support from web browser. The benefit of wasm could allow render plugin reuse the legacy code written by other lanuages. i.e. https://github.com/xuri/excelize-wasm could render excel file in the web browser which used wasm.

@hiifong
Copy link
Member

hiifong commented Dec 6, 2025

Perhaps Obsidian's plugin solution will be helpful to us: https://docs.obsidian.md/Plugins/Getting+started/Build+a+plugin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. modifies/docs modifies/frontend modifies/go Pull requests that update Go code modifies/internal modifies/migrations modifies/templates This PR modifies the template files modifies/translation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Propsal] Dynamical Frontend Render Plugin

5 participants