vortex
vortex copied to clipboard
Rust: Public API review
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
- 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%
- The most common public API methods should have doctests
- We should hoist
examplesto 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
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.