microsoft / microsoft/edit

Add support for extensions / plugins

Open
#17 19 comments 52 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

C-feature
Dominant language
Rust
Stars
14.6k
Forks
734
Avg merge
8h 40m
Merged PRs (30d)
4

Description

We'd like to keep the core editor small so that it can be easily bundled on all variants of Windows. Proper syntax highlighting, language-server support, and similar, on the other hand will increase the size significantly. An extension model would allow us to split the editor up into smaller parts.

Very rough draft:
* Expose all relevant APIs (UI, text buffer) via a C ABI straight from our binary
* Add an extension loader which searches for nearby `*.dll` / `*.so` files
* Perhaps also add some certificate checks for Windows? Not sure if this exists on other platforms.
* Also, perhaps we should add some logic, so we don't load arbitrary extensions as admin / `root`
* Extensions:
* Should expose a built-with version number so we can perform compatibility checks / shims
* We then load and execute its entrypoint
* It can then load the C ABI dynamically from our executable (`GetProcAddress` / `dlsym`)
* Initially, until we stabilize the API, we should keep all important extensions in-tree in this project

[karunamurti on HN mentioned](https://news.ycombinator.com/item?id=44037422) that we could use https://github.com/bytecodealliance/wasm-micro-runtime as an alternative to loading basic dynamic libraries.

## Requested extensions

* Mun (see #53)
* Running external apps for formatting (see #136)
* A hex editor (see #152)
* An integrated terminal (see #552)
* Code formatting (see #613)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no files, tests, or entry points; start by reviewing the editor architecture and the proposed C ABI, extension loader, and wasm-micro-runtime alternative. A complete result would require an agreed extension API, loading and compatibility model, and security approach for the requested extensions.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
desktop
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.