[wasi-common]: add armv7 support to wasi-common (#1269)
* Add armv7 support to wasi-common This commit enables `target_pointer_width = 32` compatibility for `wasi-common` (and by transitivity, any crate found inside, e.g., `yanix`). I've also added a simplistic (bare minimum) check to our CI to ensure that `wasi-common` cross-compiles to `armv7-unknown-gnueabihf` fine. While here, I've done the same for `wasm32-unknown-emscripten`. * Clean arch-specific impls + reuse libc consts * Make SeekLoc::from_raw platform independent * Collapse CI cc jobs into one
This commit is contained in:
@@ -1,15 +1,15 @@
|
||||
use crate::old::snapshot_0::{wasi, Result};
|
||||
use crate::old::snapshot_0::wasi::{self, WasiResult};
|
||||
|
||||
pub(crate) const O_RSYNC: yanix::file::OFlag = yanix::file::OFlag::RSYNC;
|
||||
|
||||
pub(crate) fn stdev_from_nix(dev: libc::dev_t) -> Result<wasi::__wasi_device_t> {
|
||||
pub(crate) fn stdev_from_nix(dev: libc::dev_t) -> WasiResult<wasi::__wasi_device_t> {
|
||||
Ok(wasi::__wasi_device_t::from(dev))
|
||||
}
|
||||
|
||||
pub(crate) fn stino_from_nix(ino: libc::ino_t) -> Result<wasi::__wasi_inode_t> {
|
||||
pub(crate) fn stino_from_nix(ino: libc::ino_t) -> WasiResult<wasi::__wasi_inode_t> {
|
||||
Ok(wasi::__wasi_device_t::from(ino))
|
||||
}
|
||||
|
||||
pub(crate) fn stnlink_from_nix(nlink: libc::nlink_t) -> Result<wasi::__wasi_linkcount_t> {
|
||||
pub(crate) fn stnlink_from_nix(nlink: libc::nlink_t) -> WasiResult<wasi::__wasi_linkcount_t> {
|
||||
Ok(nlink)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user