about summary refs log tree commit diff
path: root/library/std/src/sys/wasi/os.rs
AgeCommit message (Collapse)AuthorLines
2024-01-11std: begin moving platform support modules into `pal`joboet-301/+0
2023-08-18Fix UB in `std::sys::os::getenv()`ShE3py-8/+15
2023-08-07Better Debug for Vars and VarsOsTamir Duberstein-0/+29
Display actual vars instead of two dots. The same was done for Args and ArgsOs in 275f9a04af6191e3aee3852a5a1713.
2023-07-29Add wasm32-wasi-threads target + WASI threadsGeorgii Rylov-0/+5
2023-02-09Allow wasi-libc to initialize its environment variables lazily.Dan Gohman-1/+7
Use `__wasilibc_get_environ()` to read the environment variable list from wasi-libc instead of using `environ`. `environ` is a global variable which effectively requires wasi-libc to initialize the environment variables eagerly, and `__wasilibc_get_environ()` is specifically designed to be an alternative that lets wasi-libc intiailize its environment variables lazily. This should have the side effect of fixing at least some of the cases of #107635.
2022-10-11fix: return type of single-threaded dummy lock must be droppableAndrew Brown-2/+2
2022-10-10Implement `env_lock` with `RwLock`Andrew Brown-12/+23
Copying the approach of the Unix target, this change uses the standard `RwLock` to protect against concurrent access of libc's environment. This locking is only enabled when WebAssembly's `atomics` feature is also enabled.
2022-10-10Allow compiling the `wasm32-wasi` std library with atomicsAndrew Brown-3/+8
The issue #102157 demonstrates how currently the `-Z build-std` option will fail when re-compiling the standard library with `RUSTFLAGS` like `RUSTFLAGS="-C target-feature=+atomics,+bulk-memory -C link-args=--shared-memory"`. This change attempts to resolve those build issues by depending on the the WebAssembly `futex` module and providing an implementation for `env_lock`. Fixes #102157.
2022-10-03Reduce CString allocations in std as much as possibleAlex Saveau-27/+22
Signed-off-by: Alex Saveau <saveau.alexandre@gmail.com>
2021-07-05Make `getenv` return an Option instead of a ResultAris Merchant-5/+4
2021-04-23Explicitly implement `!Send` and `!Sync` for `sys::{Args, Env}`Christiaan Dirkx-2/+4
2021-04-20Change uses of never typeChristiaan Dirkx-2/+2
2021-04-20Replace `Void` with never typeChristiaan Dirkx-2/+2
2021-01-14std: Update wasi-libc commit of the wasm32-wasi targetAlex Crichton-3/+42
This brings in an implementation of `current_dir` and `set_current_dir` (emulation in `wasi-libc`) as well as an updated version of finding relative paths. This also additionally updates clang to the latest release to build wasi-libc with.
2020-09-03Applied `#![deny(unsafe_op_in_unsafe_fn)]` in library/std/src/wasiAmjad Alsharafi-0/+2
All refactoring needed was only in `alloc.rs`, changed part of the code in `alloc` method to satisfy the SAFETY statement
2020-07-27mv std libs to library/mark-0/+201