vortex icon indicating copy to clipboard operation
vortex copied to clipboard

Rust: Public API review

Open a10y opened this issue 7 months ago • 1 comments

The Rust public API is too expansive. Lots of types that probably don't need to be pub are publicly visible.

At the same time, entrypoints for things as simple as writing a file or serialize an Array to a Vec<u8> are non-obvious. Some goals I think we should have

  1. The public API should be as minimal as possible to enable file I/O and definitions of new encodings/extension types. We should preference the experience of Vortex users over encoding authors, since they will be the 99%
  2. The most common public API methods should have doctests
  3. We should hoist examples to the root of the workspace so they're visible immediately when you open the repo page. They should include solid examples for datafusion, basic file IO, new encoding plugins, and new extension types

a10y avatar May 19 '25 14:05 a10y

Do we dare consider consolidating crates for this? Lots of things are public so they can be used by other Vortex crates. c.f. https://github.com/tokio-rs/tokio/issues/1318

Honestly I think we could get a long way without this though, lots of low hanging fruit.

gatesn avatar May 19 '25 17:05 gatesn