Skip to content

Commit 25c7d82

Browse files
committed
Add wasi check to ci.
1 parent b69cfaf commit 25c7d82

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

.github/workflows/ci.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,16 @@ jobs:
105105
command: check
106106
args: --target aarch64-linux-android
107107

108+
- uses: actions-rs/toolchain@v1
109+
with:
110+
target: wasm32-wasi
111+
112+
- name: Check compilation for wasi
113+
uses: actions-rs/cargo@v1
114+
with:
115+
command: check
116+
args: --target wasm32-wasi --features freeze-stdlib
117+
108118
- name: Prepare repository for redox compilation
109119
run: bash scripts/redox/uncomment-cargo.sh
110120
- name: Check compilation for Redox

vm/src/exceptions.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -989,7 +989,7 @@ impl<C: widestring::UChar> IntoPyException for widestring::NulError<C> {
989989
}
990990
}
991991

992-
#[cfg(not(target_arch = "wasm32"))]
992+
#[cfg(any(unix, windows, target_os = "wasi"))]
993993
pub(crate) fn raw_os_error_to_exc_type(errno: i32, vm: &VirtualMachine) -> Option<PyTypeRef> {
994994
use crate::stdlib::errno::errors;
995995
let excs = &vm.ctx.exceptions;
@@ -998,6 +998,7 @@ pub(crate) fn raw_os_error_to_exc_type(errno: i32, vm: &VirtualMachine) -> Optio
998998
errors::EALREADY => Some(excs.blocking_io_error.clone()),
999999
errors::EINPROGRESS => Some(excs.blocking_io_error.clone()),
10001000
errors::EPIPE => Some(excs.broken_pipe_error.clone()),
1001+
#[cfg(not(target_os = "wasi"))]
10011002
errors::ESHUTDOWN => Some(excs.broken_pipe_error.clone()),
10021003
errors::ECHILD => Some(excs.child_process_error.clone()),
10031004
errors::ECONNABORTED => Some(excs.connection_aborted_error.clone()),

0 commit comments

Comments
 (0)