Skip to content

Commit 0718844

Browse files
authored
More clearly mark Vello API as an experiment/preview (linebender#1372)
See some discussion around [#vello > Landing Vello API @ 💬](https://xi.zulipchat.com/#narrow/channel/197075-vello/topic/Landing.20Vello.20API/near/569000588) and linebender#1360 for more context.
1 parent b18b4df commit 0718844

File tree

7 files changed

+37
-18
lines changed

7 files changed

+37
-18
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ jobs:
113113
run: cargo rdme --check --workspace-project=vello_common
114114

115115
- name: Run cargo rdme (vello_api)
116-
run: cargo rdme --check --heading-base-level=0 --workspace-project=vello_api
116+
run: cargo rdme --check --workspace-project=vello_api
117117

118118
- name: Run cargo rdme (vello_hybrid)
119119
run: cargo rdme --check --workspace-project=vello_hybrid

sparse_strips/vello_api/README.md

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# Vello API
44

5-
**Public API types**
5+
**Experimental public API for Vello Renderers**
66

77
[![Latest published version.](https://img.shields.io/crates/v/vello_api.svg)](https://crates.io/crates/vello_api)
88
[![Documentation build status.](https://img.shields.io/docsrs/vello_api.svg)](https://docs.rs/vello_api)
@@ -16,7 +16,7 @@
1616

1717
<!-- We use cargo-rdme to update the README with the contents of lib.rs.
1818
To edit the following section, update it in lib.rs, then run:
19-
cargo rdme --workspace-project=vello_api --heading-base-level=0
19+
cargo rdme --workspace-project=vello_api
2020
Full documentation at https://github.com/orium/cargo-rdme -->
2121

2222
<!-- Intra-doc links used in lib.rs should be evaluated here.
@@ -26,18 +26,21 @@ See https://linebender.org/blog/doc-include/ for related discussion. -->
2626

2727
<!-- cargo-rdme start -->
2828

29-
Vello API is the rendering API of the 2D renderers in the Vello project.
29+
Vello API is the **experimental** rendering API of the 2D renderers in the Vello project.
30+
31+
Warning: Vello API is currently only released as a preview, and is not ready for usage beyond short-term experiments.
32+
We know of several design decisions which will change before its use can be recommended.
3033

3134
There are currently two [supported Vello renderers](#renderers), each with different tradeoffs.
3235
This crate allows you to write the majority of your application logic to support either of those renderers.
3336
These renderers are [Vello CPU](todo) and [Vello Hybrid](todo).
3437

35-
# Usage
38+
## Usage
3639

3740
TODO: Mention Renderer trait when it exists. Otherwise, this code isn't really usable yet.
3841
TODO: This is a stub just to have an outline to push.
3942

40-
# Renderers
43+
## Renderers
4144

4245
The Vello renderers which support this API are:
4346

@@ -65,7 +68,7 @@ Vello API guarantees identical rendering between renderers which implement it, b
6568
This doesn't apply to renderer-specific features.
6669
<!-- TODO: Is ^ true? -->
6770

68-
# Abstraction Boundaries
71+
## Abstraction Boundaries
6972

7073
The abstractions in this crate are focused on 2D rendering, and the resources required to perform that.
7174
In particular, this does not abstract over strategies for:
@@ -78,7 +81,7 @@ These functionalities are however catered for where applicable by APIs on the sp
7881
The renderer API supports downcasting to the specific renderer, so that these extensions can be called.
7982
Each supported renderer will/does have examples showing how to achieve this yourself.
8083

81-
# Text
84+
## Text
8285

8386
Vello API does not handle text/glyph rendering itself.
8487
This allows for improved resource sharing of intermediate text layout data, for hinting and ink splitting underlines.
@@ -88,15 +91,15 @@ Note that this crate is not currently implemented; design work is ongoing.
8891
We also support rendering using using traditional glyph atlases, which may be preferred by some consumers.
8992
This is especially useful to achieve subpixel rendering, such as ClearType, which Vello doesn't currently support directly.
9093

91-
# Unimplemented Features
94+
## Unimplemented Features
9295

9396
NOTE: This section is not complete; in particular, we have only pushed a half-version of this API to make review more scoped.
9497

9598
The current version of Vello API is a minimal viable product for exploration and later expansion.
9699
As such, there are several features which we expect to be included in this API, but which are not yet exposed in this crate.
97100
These are categorised as follows:
98101

99-
## Out of scope/Renderer specific
102+
### Out of scope/Renderer specific
100103

101104
<!-- This section can be removed once the other three classes are empty -->
102105
As discussed above, some features are out-of-scope, as they have concerns which need to be handled individually by each renderer.
@@ -105,7 +108,7 @@ This includes:
105108
- Rendering directly to a surface.
106109
- Importing "external" textures (e.g. from a `wgpu::Texture`)
107110

108-
## Excluded for expedience
111+
### Excluded for expedience
109112

110113
- Renderer specific painting commands (i.e. using downcasting).
111114
This is intended to be an immediate follow-up to the MVP landing.
@@ -122,7 +125,7 @@ This includes:
122125
- "Unsetting" the brush; this is mostly useful for append style operations, which may unexpectedly change the brush.
123126
- Dynamic version of `PaintScene`, allowing `dyn PaintScene` for cases where that would be relevant.
124127

125-
## Not cross-renderer
128+
### Not cross-renderer
126129

127130
There are some features which are only implemented in one of our target renderers, so cannot yet be included in the generalised API.
128131
As an interim solution, we intend to expose these features as renderer specific extensions (see the "excluded for expedience section").
@@ -136,7 +139,7 @@ For Vello CPU, these are (i.e. Vello Hybrid does not implement these):
136139

137140
There are currently no such features the other way around (i.e. which only Vello Hybrid supports).
138141

139-
## Not implemented
142+
### Not implemented
140143

141144
- Path caching. This feature is intended to allow re-using paths efficiently, primarily for glyphs.
142145
- Blurred rounded rectangle paints in custom shapes (e.g. to exclude the unblurred parts).

sparse_strips/vello_api/src/lib.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@
66

77
// These docs are written for a more complete version of Vello API.
88

9-
//! Vello API is the rendering API of the 2D renderers in the Vello project.
9+
//! Vello API is the **experimental** rendering API of the 2D renderers in the Vello project.
10+
//!
11+
//! Warning: Vello API is currently only released as a preview, and is not ready for usage beyond short-term experiments.
12+
//! We know of several design decisions which will change before its use can be recommended.
1013
//!
1114
//! There are currently two [supported Vello renderers](#renderers), each with different tradeoffs.
1215
//! This crate allows you to write the majority of your application logic to support either of those renderers.

sparse_strips/vello_api/src/painter.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ pub type StandardBrush = Brush<ImageBrush<TextureId>>;
5757
/// [`append`]: PaintScene::append
5858
/// [`Renderer`]: todo
5959
pub trait PaintScene: Any {
60-
// TODO: This also "clobbers" the brush; we need to document that.
6160
/// Insert the contents of `Scene` into the drawing sequence at this point, with the 2d affine
6261
/// `transform` applied to its contents.
6362
///

sparse_strips/vello_common/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
<!-- We use cargo-rdme to update the README with the contents of lib.rs.
1818
To edit the following section, update it in lib.rs, then run:
19-
cargo rdme --workspace-project=vello_common --heading-base-level=0
19+
cargo rdme --workspace-project=vello_common
2020
Full documentation at https://github.com/orium/cargo-rdme -->
2121

2222
<!-- Intra-doc links used in lib.rs should be evaluated here.

sparse_strips/vello_cpu/src/api.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
// Copyright 2025 the Vello Authors
22
// SPDX-License-Identifier: Apache-2.0 OR MIT
33

4-
//! Integration of Vello API into Vello CPU.
4+
//! Integration of the experimental Vello API preview into Vello CPU.
5+
//!
6+
//! <div class="warning">
7+
//!
8+
//! Vello API is currently in an experimental phase, released only as a preview, and has no stability guarantees.
9+
//! See [its documentation](vello_api) for more details.
10+
//!
11+
//! </div>
512
613
use vello_api::{
714
PaintScene, Scene,

sparse_strips/vello_hybrid/src/api.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
// Copyright 2025 the Vello Authors
22
// SPDX-License-Identifier: Apache-2.0 OR MIT
33

4-
//! Integration of Vello API into Vello Hybrid.
4+
//! Integration of the experimental Vello API preview into Vello Hybrid.
5+
//!
6+
//! <div class="warning">
7+
//!
8+
//! Vello API is currently in an experimental phase, released only as a preview, and has no stability guarantees.
9+
//! See [its documentation](vello_api) for more details.
10+
//!
11+
//! </div>
512
613
use vello_api::{
714
PaintScene, Scene,

0 commit comments

Comments
 (0)