1
Fork 0

Add shims for modules that we can't implement on CloudABI.

As discussed in #47268, libstd isn't ready to have certain functionality
disabled yet. Follow wasm's approach of adding no-op modules for all of
the features that we can't implement.

I've placed all of those shims in a shims/ subdirectory, so we (the
CloudABI folks) can experiment with removing them more easily. It also
ensures that the code that does work doesn't get polluted with lots of
useless boilerplate code.
This commit is contained in:
Ed Schouten 2018-01-11 11:21:42 +01:00
parent 20745264ce
commit d882bb516e
13 changed files with 980 additions and 9 deletions

View file

@ -43,16 +43,13 @@ pub mod thread_local;
pub mod util;
pub mod wtf8;
pub mod bytestring;
#[cfg(not(target_os = "cloudabi"))]
pub mod process;
cfg_if! {
if #[cfg(any(target_os = "redox", target_os = "l4re"))] {
if #[cfg(any(target_os = "cloudabi", target_os = "l4re", target_os = "redox"))] {
pub use sys::net;
} else if #[cfg(all(target_arch = "wasm32", not(target_os = "emscripten")))] {
pub use sys::net;
} else if #[cfg(target_os = "cloudabi")] {
// No networking support on CloudABI (yet).
} else {
pub mod net;
}