Skip to content

Method to save custom metadata #3

Open
@xldenis

Description

@xldenis

Many formal verification tools need generate metadata as part of the compilation of a crate, particularily so that crate can then be used in downstream projects. This is fine so long as no rustc datastructures are involved, but the moment they are things become much less clear.

Serializing rustc datastructures seems to be exactly the role of TyEncodable and TyEncoder but figuring out how to actually use this to serialize a custom map / table of some kind is... not easy.


What I'm searching for is a mechanism which is capable of serializing a custom map which contains various DefId, SubstsRef and Tys and which is then capable of deserializing it within another crate. On its surface this seems to be exactly what the metadata system of rustc does, just with a custom table.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions