You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
libstd links to the abstract_platform and a platform crate. Almost all libstd types wrap around their counterpart in abstract_platform, instancing them via the platform impl.
This crate needs to make sure to only interact with the platform crate via the abstract_platform types, with the exception of statics and the ext module.
No assumptions over any of the types provided by platform may be made.
To allow a smoother transition, this will be implemented completely inside of ::sys at first.
abstract_platform provides traits deacribing the required types, functions and constants to be provided by a platform crate. Furthermore it provides almost all types of libstd but generic over the platform (using the aforementioned traits). Statics can't be generic, so they can't be formalized via a trait and thus need to follow an informal contract (probably described in the crate doc).
platform provides a platform implementation by implementing the traits and statics from abstract_platform.
Platform specific extensions may be provided at ::ext via a platform specific contract.
This crate needs to take care not to export any items except ::Std (which needs to implement abstract_platform::traits::Std), required statics and an optional ext module. ::Std must be either an empty struct or an empty enum.
The text was updated successfully, but these errors were encountered:
There are 3 key crates in this plan: libstd, abstract_platform, and platform (e.g. platform_unix).
libstd links to the abstract_platform and a platform crate. Almost all libstd types wrap around their counterpart in abstract_platform, instancing them via the platform impl.
This crate needs to make sure to only interact with the platform crate via the abstract_platform types, with the exception of statics and the ext module.
No assumptions over any of the types provided by
platform
may be made.To allow a smoother transition, this will be implemented completely inside of
::sys
at first.abstract_platform provides traits deacribing the required types, functions and constants to be provided by a platform crate. Furthermore it provides almost all types of libstd but generic over the platform (using the aforementioned traits). Statics can't be generic, so they can't be formalized via a trait and thus need to follow an informal contract (probably described in the crate doc).
platform provides a platform implementation by implementing the traits and statics from abstract_platform.
Platform specific extensions may be provided at
::ext
via a platform specific contract.This crate needs to take care not to export any items except
::Std
(which needs to implementabstract_platform::traits::Std
), required statics and an optionalext
module.::Std
must be either an empty struct or an empty enum.The text was updated successfully, but these errors were encountered: