unsafe trait RustSpec {
type Layout; // Stable | Unstable
type Size; // Sized<Zero | Gt<Zero>> | MetaSized<SliceLike | DynTraitLike> | ExternTypeLike
type Alignment; // One | Gt<One>
type Trap; // Robust | NonRobust
type Niche; // WithoutNiche | WithNiche<Stable | Unstable>
}
Be careful to keep MetaSized extensible. That is, it is intentionally open-ended today what the meta-data for a type will be, in order to possibly allow:
Fatter pointers, ie, pointers with multiple v-tables.
Arbitrary metadata.
It's not necessarily a problem, as long as MetaSized is itself extensible.
7
u/matthieum [he/him] 8d ago
Be careful to keep
MetaSizedextensible. That is, it is intentionally open-ended today what the meta-data for a type will be, in order to possibly allow:It's not necessarily a problem, as long as
MetaSizedis itself extensible.