summaryrefslogtreecommitdiff
path: root/src/wasi.rs
Commit message (Collapse)AuthorAgeFilesLines
* wasi: add __errno_locationConnor Peet2023-03-071-0/+2
| | | | This was also missing from wasi's .rs
* add S_IRWX* constants to wasiConnor Peet2023-03-061-0/+3
|
* Add ISO C functions atof, atol, atoll, strtoll, strtoullLegionMammal9782022-12-141-1/+5
|
* fix: Order of all `s_*!` macro callsFlorian Bartels2022-10-281-2/+1
|
* wasi add langinfo.hDean Li2022-02-131-0/+69
|
* Auto merge of #2575 - sunfishcode:sunfishcode/wasi-getcwd, r=Amanieubors2021-12-041-0/+2
|\ | | | | | | | | | | | | | | | | | | Update to the latest released wasi-libc and declare `getcwd`/`chdir` Update to the latest version of wasi-libc which corresponds to the version in the wasi-sdk 14.0 release. And, add declarations for `getcwd` and `chdir`, which are now provided by wasi-libc.
| * Update to the latest released wasi-libc and declare `getcwd`/`chdir`Dan Gohman2021-12-021-0/+2
| | | | | | | | | | | | | | | | Update to the latest version of wasi-libc which corresponds to the version in the wasi-sdk 14.0 release. And, add declarations for `getcwd` and `chdir`, which are now provided by wasi-libc.
* | Add `#[allow(missing_debug_implementations)]` to WASI's `max_align_t`.Dan Gohman2021-12-031-0/+1
| |
* | Define max_align_t for wasi.Dan Gohman2021-12-031-0/+7
|/ | | | WASI has a normal max_align_t.
* Scope in Send, Sync for wasiJubilee Young2021-11-101-0/+2
|
* Auto merge of #2272 - 12101111:musl-bundle, r=Amanieubors2021-11-041-1/+6
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use link modifiers -bundle on musl and wasi target Implement https://github.com/rust-lang/rust/issues/72274 Fix: - https://github.com/rust-lang/wg-cargo-std-aware/issues/66 - https://github.com/rust-lang/rust/issues/89626 TODO: - [x] Implement rustbuild side change: https://github.com/rust-lang/rust/pull/90527
| * Use link modifiers -bundle on musl and wasi target121011112021-11-031-1/+6
| |
* | Use ptr::addr_of when availableNoa2021-11-011-4/+6
| |
* | Enable clock_gettime on wasiNoa2021-11-011-8/+22
|/
* Add `strtof` for all platforms that have `strtod`Hans Christian Schmitz2021-08-221-0/+1
| | | | | | | All platforms that have `strtod` very likely also have `strtof`. Having `strtof` allows for fuzzing of `hexf-parse::parse_hexf32` comparing against `strtof`, which can't (easily) be done with `strtod`, due to float rounding and over-/underflow behavior.
* Define `S_I{R,W,X}{USR,GRP,OTH}` and `S_IS{VTX,UID,GID}` for wasi.Dan Gohman2021-07-011-0/+12
| | | | | | WASI doesn't have full permissions setting, but it's gaining some support, so define the POSIX names that wasi-libc defines, and let WASI libc and WASI sort out what to do with them.
* Define `O_CLOEXEC` for WASI.Dan Gohman2021-06-011-0/+1
| | | | | | | | `O_CLOEXEC` is defined to be 0 in WASI libc: https://github.com/WebAssembly/wasi-libc/blob/659ff414560721b1660a19685110e484a081c3d4/libc-bottom-half/headers/public/__header_fcntl.h#L24 so define it accordingly in Rust's `libc` bindings.
* Fix styleYuki Okushi2021-04-061-236/+49
|
* WASI: define `AT_FDCWD` and update to latest WASI libcDan Gohman2021-02-181-1/+109
| | | | | | Update to the latest WASI libc, define `AT_FDCWD`, update the signature for __wasilibc_find_relpath, and add declarations for various `__wasilibc_` utility functions.
* Declare `wchar_t` for WASIYuki Okushi2021-02-101-0/+1
|
* Define some `sysconf` constants for WASI.Dan Gohman2020-09-131-0/+5
|
* Define several more constants for WASI.Dan Gohman2020-09-031-0/+12
| | | | | Define `O_NOCTTY`, `R_OK`, `POLLIN`, and related constants using the current values from WASI libc.
* Add more WASI libc definitions.Dan Gohman2020-07-061-1/+26
| | | | | | | | | This adds various WASI libc definitions to the Rust libc bindings that I needed while porting some applications to WASI. It also removes the `pause` binding since newer versions of WASI libc have removed this function as well. (WASI currently has no syscall with this functionality.)
* Declare `seekdir` and `telldir` for WASI.Dan Gohman2020-07-011-0/+2
| | | | These declarations are the same as those for other platforms.
* Update bindings for the wasm32-wasi targetAlex Crichton2019-12-161-8/+5
| | | | | | | | | | | | This commit performs a number of updates for libc with the `wasm32-wasi` target: * Updates the `wasi-libc` repository commit used (previously known as `wasi-sysroot`) * Updates the container to Ubuntu 19.10 which has Clang 9 packaged which is all we need. * Avoids building `wasmtime` and instead downloads a precompiled binary. * Updates bindings in `src/wasi.rs` to match the current upstream state.
* Formattinggnzlbg2019-09-121-3/+3
|
* Auto merge of #1461 - newpavlov:patch-4, r=gnzlbgbors2019-09-071-679/+91
|\ | | | | | | | | | | | | | | | | | | | | | | Remove WASI Core API Closes #1434 This change does not break the backwards compatibility promise since WASI Core API is unstable right now. If applications or libraries want to use Core API directly they should use [`wasi`](https://crates.io/crates/wasi) instead of `libc`. Blocked by: rust-lang/rust#63676 cc @sunfishcode
| * add __wasi_rights_tnewpavlov2019-08-211-0/+2
| |
| * remove types and constantsArtyom Pavlov2019-08-131-404/+91
| |
| * remove WASI Core APIArtyom Pavlov2019-08-091-277/+0
| |
* | Fix style error in wasi.rsLuke Petre2019-08-181-1/+0
| |
* | Adding UTIME_NOW and UTIME_OMIT to OSes which support utimensatLuke Petre2019-08-171-0/+3
|/
* wasi: add c_schar definitionTravis Finkenauer2019-06-251-0/+1
|
* Refactor fixed-width integer types into its own modulegnzlbg2019-05-291-8/+0
|
* Update to the latest wasi-sysroot.Dan Gohman2019-05-161-0/+18
| | | | | | - Rename `wasm32-unknown-wasi` to `wasm32-wasi`. - `__wasilibc_rmfileat` was renamed to `__wasilibc_unlinkat` - Add bindings for a few more functions and typedefs.
* Rename _wasi_rmfileat to _wasi_unlinkatgnzlbg2019-05-161-1/+1
|
* Remove utsname and uname for now too.Dan Gohman2019-04-241-10/+0
|
* Remove fd_set, select, and pselect entirely for now.Dan Gohman2019-04-241-20/+0
| | | | | fd_set isn't automatically copyable. While it will be possible to fix that, for now just remove these so that they don't block other changes.
* Remove the definition of ULONG_SIZE which is no longer needed.Dan Gohman2019-04-241-11/+0
|
* Use the WASI layout for fd_set.Dan Gohman2019-04-241-1/+2
|
* Remove FD_SET and related functions for now.Dan Gohman2019-04-231-5/+0
|
* Fix dirent to match WASI libc's definition.Dan Gohman2019-04-231-6/+14
| | | | | dirent contains a flexible array member, so don't test its sizeof, don't allow it to be copied, and don't represent it with an artificial size.
* Make FD_ISSET's argument a pointer to const, to match the libc declaration.Dan Gohman2019-04-231-1/+1
|
* Don't make opaque types like FILE and DIR copyable.Dan Gohman2019-04-231-19/+6
| | | | | Also, locale_t is a typedef for a pointer to an opaque struct, so represent it that way explicitly.
* Define WASI libc errno constants.Dan Gohman2019-04-231-0/+79
|
* Add more WASI libc bindings.Dan Gohman2019-04-231-0/+502
|
* Add binding for new `__wasilibc_find_relpath` APIAlex Crichton2019-04-081-4/+10
| | | | Added recently and will be used in libstd!
* Enable the wasi target on CIAlex Crichton2019-04-051-9/+12
| | | | Now that wasi is in nightlies, we can run it on PRs!
* Touch up style of wasi.rsAlex Crichton2019-03-271-144/+144
|
* Address some PR feedbackAlex Crichton2019-03-271-65/+51
|