mirror of
https://github.com/nushell/nushell.git
synced 2025-04-29 23:54:26 +02:00
Make job mail-related commands not available in wasm
WebAssembly doesn't have std::time::Instant, which is used by the job mailbox, so this commits restricts the mailbox commands so that they aren't available in WebAssembly targets.
This commit is contained in:
parent
481da34342
commit
37b69b8c4c
@ -452,11 +452,15 @@ pub fn add_shell_command_context(mut engine_state: EngineState) -> EngineState {
|
||||
JobList,
|
||||
JobKill,
|
||||
JobId,
|
||||
Job,
|
||||
};
|
||||
|
||||
#[cfg(not(target_family = "wasm"))]
|
||||
bind_command! {
|
||||
JobSend,
|
||||
JobRecv,
|
||||
JobFlush,
|
||||
Job,
|
||||
};
|
||||
}
|
||||
|
||||
#[cfg(all(unix, feature = "os"))]
|
||||
bind_command! {
|
||||
|
@ -1,16 +1,20 @@
|
||||
mod is_admin;
|
||||
mod job;
|
||||
mod job_flush;
|
||||
mod job_id;
|
||||
mod job_kill;
|
||||
mod job_list;
|
||||
mod job_recv;
|
||||
mod job_send;
|
||||
mod job_spawn;
|
||||
|
||||
#[cfg(all(unix, feature = "os"))]
|
||||
mod job_unfreeze;
|
||||
|
||||
#[cfg(not(target_family = "wasm"))]
|
||||
mod job_flush;
|
||||
#[cfg(not(target_family = "wasm"))]
|
||||
mod job_recv;
|
||||
#[cfg(not(target_family = "wasm"))]
|
||||
mod job_send;
|
||||
|
||||
pub use is_admin::IsAdmin;
|
||||
pub use job::Job;
|
||||
pub use job_id::JobId;
|
||||
@ -18,8 +22,11 @@ pub use job_kill::JobKill;
|
||||
pub use job_list::JobList;
|
||||
pub use job_spawn::JobSpawn;
|
||||
|
||||
#[cfg(not(target_family = "wasm"))]
|
||||
pub use job_flush::JobFlush;
|
||||
#[cfg(not(target_family = "wasm"))]
|
||||
pub use job_recv::JobRecv;
|
||||
#[cfg(not(target_family = "wasm"))]
|
||||
pub use job_send::JobSend;
|
||||
|
||||
#[cfg(all(unix, feature = "os"))]
|
||||
|
Loading…
Reference in New Issue
Block a user