Nested package definitions are already supported by wit-parser but don't seem to have any support in wit-encoder. Could I introduce this? I'm thinking it could be a newtype struct NestedPackage(Package) that overrides the rendering function but provides the same API as Package.
Could also take this opportunity to refactor Package into a WitFile type that mirrors the spec. That would be a breaking change, but I think there's some value in having a 1-to-1 mapping from spec constructions to wit-encoder types.