Problem
Core methods in this workspace live on traits, not inherent impls: sum() and rank() on AbstractTensorTrain (crates/tensor4all-simplett/src/traits.rs), contract_pair on TensorContractionLike (crates/tensor4all-core/src/tensor_like.rs). No crate ships a prelude module (pub mod prelude has zero hits across crates/).
Consequence: the most likely first-try failure for a new user or coding agent is error[E0599]: no method named 'sum' found after forgetting a trait import it had no reason to guess. Every quickstart in the repo works around this with an import list:
use tensor4all_simplett::{AbstractTensorTrain, CompressionOptions, TensorTrain};
tensor4all-interpolativeqtt partially compensates by re-exporting (src/lib.rs:47: pub use tensor4all_simplett::{AbstractTensorTrain, TensorTrain};), but this courtesy is not systematic.
Proposed direction
Add a conventional prelude module to each user-facing crate (tensor4all-core, tensor4all-simplett, tensor4all-treetn, tensor4all-itensorlike, tensor4all-tensorci, tensor4all-quanticstci, tensor4all-aci, tensor4all-interpolativeqtt), re-exporting that crate's public traits plus the handful of types needed to call them, so user code starts with:
use tensor4all_simplett::prelude::*;
Notes:
Non-goals
A facade crate; renaming or merging traits; deprecating direct imports.
Acceptance criteria
- Each user-facing crate has a documented
prelude covering its public traits.
- README and getting-started quickstarts compile with prelude imports only.
Problem
Core methods in this workspace live on traits, not inherent impls:
sum()andrank()onAbstractTensorTrain(crates/tensor4all-simplett/src/traits.rs),contract_paironTensorContractionLike(crates/tensor4all-core/src/tensor_like.rs). No crate ships apreludemodule (pub mod preludehas zero hits acrosscrates/).Consequence: the most likely first-try failure for a new user or coding agent is
error[E0599]: no method named 'sum' foundafter forgetting a trait import it had no reason to guess. Every quickstart in the repo works around this with an import list:tensor4all-interpolativeqttpartially compensates by re-exporting (src/lib.rs:47:pub use tensor4all_simplett::{AbstractTensorTrain, TensorTrain};), but this courtesy is not systematic.Proposed direction
Add a conventional
preludemodule to each user-facing crate (tensor4all-core,tensor4all-simplett,tensor4all-treetn,tensor4all-itensorlike,tensor4all-tensorci,tensor4all-quanticstci,tensor4all-aci,tensor4all-interpolativeqtt), re-exporting that crate's public traits plus the handful of types needed to call them, so user code starts with:Notes:
Non-goals
A facade crate; renaming or merging traits; deprecating direct imports.
Acceptance criteria
preludecovering its public traits.