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:
parent
20745264ce
commit
d882bb516e
13 changed files with 980 additions and 9 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue