Introduce `baseview-core` crate for a common, more stable API for other crates to re-export

Open
#343 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 12 days

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
rust
Domain
backend

Research direction

Start by reading the baseview crate’s public API and the GUI integration crates mentioned in the issue, egui-baseview and iced-baseview, to see which types they wrap or re-implement. Then identify which APIs are stable utilities for plugin use and which depend on WindowHandler and GUI adapters. Done means a proposed baseview-core crate boundary and trait-based API that reduces this duplication while supporting the compatibility goal.

Written by the indexing model from the issue text.

Description

Currently, GUI framework integration crates (such as egui-baseview and iced-baseview) have to either wrap or re-implement a lot of baseview's types if they want to expose them in their public APIs, just to shield themselves from semver-incompatible baseview releases (even though the aforementioned APIs actually rarely change, compared to e.g. WindowHandler APIs).

This results in a lot of tedious and ultimately unnecessary code that those crates have to implement and maintain.

This is because the baseview crate currently acts as a bridge for two different sides: the GUI implementation/framework adapter side, and the plugin/plugin framework/host side.

We could create a new baseview-core (name TBD) crate that would expose the more stable utilities and APIs as traits for plugins to use directly, while leaving out the WindowHandler & co. APIs only for GUI implementations (and/or framework adapters) to use.

Ideally, plugin frameworks such as Nice-Plug could potentially even support spawning and managing any type of Window that implements baseview-core traits, making any-to-any compatibility between plugin frameworks and GUI frameworks possible.

Dominant language
Rust
Stars
387
Forks
128
Avg merge
11d 18h
Merged PRs (30d)
5

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

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.

More from RustAudio/baseview

All issues in RustAudio/baseview

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.