<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/src/libstd/sys/mod.rs, branch beta</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=beta</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=beta'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2020-07-28T00:51:13+00:00</updated>
<entry>
<title>mv std libs to library/</title>
<updated>2020-07-28T00:51:13+00:00</updated>
<author>
<name>mark</name>
<email>markm@cs.wisc.edu</email>
</author>
<published>2020-06-12T02:31:49+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=2c31b45ae878b821975c4ebd94cc1e49f6073fd0'/>
<id>urn:sha1:2c31b45ae878b821975c4ebd94cc1e49f6073fd0</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Introduce restricted-std feature.</title>
<updated>2020-07-15T16:57:05+00:00</updated>
<author>
<name>Eric Huss</name>
<email>eric@huss.org</email>
</author>
<published>2020-06-01T01:09:25+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=6e9a1de0d146734e51cc7e761b288e9b9b138d4f'/>
<id>urn:sha1:6e9a1de0d146734e51cc7e761b288e9b9b138d4f</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Require issue = "none" over issue = "0" in unstable attributes</title>
<updated>2019-12-21T11:16:18+00:00</updated>
<author>
<name>Ross MacArthur</name>
<email>ross@macarthur.io</email>
</author>
<published>2019-12-21T11:16:18+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=f7256d28d1c2f8340ab5b99df4bdb15aa232f3f3'/>
<id>urn:sha1:f7256d28d1c2f8340ab5b99df4bdb15aa232f3f3</id>
<content type='text'>
</content>
</entry>
<entry>
<title>rename cfg(rustdoc) into cfg(doc)</title>
<updated>2019-11-06T17:32:51+00:00</updated>
<author>
<name>Guillaume Gomez</name>
<email>guillaume1.gomez@gmail.com</email>
</author>
<published>2019-11-06T17:32:51+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=0282c27781b2f7501f4385ef22da82acc179c00e'/>
<id>urn:sha1:0282c27781b2f7501f4385ef22da82acc179c00e</id>
<content type='text'>
</content>
</entry>
<entry>
<title>redesign of the interface to the unikernel HermitCore</title>
<updated>2019-10-06T15:26:14+00:00</updated>
<author>
<name>Stefan Lankes</name>
<email>slankes@eonerc.rwth-aachen.de</email>
</author>
<published>2019-10-06T15:26:14+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=c1e440a90f472468c8069ba6254b23c6feedc32e'/>
<id>urn:sha1:c1e440a90f472468c8069ba6254b23c6feedc32e</id>
<content type='text'>
- the old interface between HermitCore and the Rust Standard Library
  based on a small C library (newlib)
- remove this interface and call directly the unikernel
- remove the dependency to the HermitCore linker
- use rust-lld as linker
</content>
</entry>
<entry>
<title>redox: convert to target_family unix</title>
<updated>2019-08-06T22:18:23+00:00</updated>
<author>
<name>Jeremy Soller</name>
<email>jeremy@system76.com</email>
</author>
<published>2019-04-07T14:39:54+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=0498da9a3dc061f604fcfb9b56bd889e07f2b7e2'/>
<id>urn:sha1:0498da9a3dc061f604fcfb9b56bd889e07f2b7e2</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Add supporting for vxWorks</title>
<updated>2019-07-16T07:13:07+00:00</updated>
<author>
<name>Baoshan Pang</name>
<email>baoshan.pang@windriver.com</email>
</author>
<published>2019-07-16T06:57:53+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=4c0c0f6158b464ee5070b32bb37f2863d0eff012'/>
<id>urn:sha1:4c0c0f6158b464ee5070b32bb37f2863d0eff012</id>
<content type='text'>
r? @alexcrichton
</content>
</entry>
<entry>
<title>std: Remove internal definitions of `cfg_if!` macro</title>
<updated>2019-06-10T17:58:44+00:00</updated>
<author>
<name>Alex Crichton</name>
<email>alex@alexcrichton.com</email>
</author>
<published>2019-06-10T15:12:14+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=8eb7f36a3ba06dbea4a44254c3e2d92455ae150f'/>
<id>urn:sha1:8eb7f36a3ba06dbea4a44254c3e2d92455ae150f</id>
<content type='text'>
This is duplicated in a few locations throughout the sysroot to work
around issues with not exporting a macro in libstd but still wanting it
available to sysroot crates to define blocks. Nowadays though we can
simply depend on the `cfg-if` crate on crates.io, allowing us to use it
from there!
</content>
</entry>
<entry>
<title>Categorize WASI as an "OS" rather than as an "environment".</title>
<updated>2019-05-04T06:01:24+00:00</updated>
<author>
<name>Dan Gohman</name>
<email>sunfish@mozilla.com</email>
</author>
<published>2019-04-19T16:59:35+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=33ea556cb5301479c3cefe100d7a3216d135f5b0'/>
<id>urn:sha1:33ea556cb5301479c3cefe100d7a3216d135f5b0</id>
<content type='text'>
This distinction is fairly abstract, but in practice, the main advantage
here is that LLVM's triple code considers WASI to be an OS, so this
makes rustc agree with that.
</content>
</entry>
<entry>
<title>Add a new wasm32-unknown-wasi target</title>
<updated>2019-03-29T22:58:17+00:00</updated>
<author>
<name>Alex Crichton</name>
<email>alex@alexcrichton.com</email>
</author>
<published>2019-02-13T18:02:22+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=ace71240d233e71fcc6e3824fa2e5e05697fd2cc'/>
<id>urn:sha1:ace71240d233e71fcc6e3824fa2e5e05697fd2cc</id>
<content type='text'>
This commit adds a new wasm32-based target distributed through rustup,
supported in the standard library, and implemented in the compiler. The
`wasm32-unknown-wasi` target is intended to be a WebAssembly target
which matches the [WASI proposal recently announced.][LINK]. In summary
the WASI target is an effort to define a standard set of syscalls for
WebAssembly modules, allowing WebAssembly modules to not only be
portable across architectures but also be portable across environments
implementing this standard set of system calls.

The wasi target in libstd is still somewhat bare bones. This PR does not
fill out the filesystem, networking, threads, etc. Instead it only
provides the most basic of integration with the wasi syscalls, enabling
features like:

* `Instant::now` and `SystemTime::now` work
* `env::args` is hooked up
* `env::vars` will look up environment variables
* `println!` will print to standard out
* `process::{exit, abort}` should be hooked up appropriately

None of these APIs can work natively on the `wasm32-unknown-unknown`
target, but with the assumption of the WASI set of syscalls we're able
to provide implementations of these syscalls that engines can implement.
Currently the primary engine implementing wasi is [wasmtime], but more
will surely emerge!

In terms of future development of libstd, I think this is something
we'll probably want to discuss. The purpose of the WASI target is to
provide a standardized set of syscalls, but it's *also* to provide a
standard C sysroot for compiling C/C++ programs. This means it's
intended that functions like `read` and `write` are implemented for this
target with a relatively standard definition and implementation. It's
unclear, therefore, how we want to expose file descriptors and how we'll
want to implement system primitives. For example should `std::fs::File`
have a libc-based file descriptor underneath it? The raw wasi file
descriptor? We'll see! Currently these details are all intentionally
hidden and things we can change over time.

A `WasiFd` sample struct was added to the standard library as part of
this commit, but it's not currently used. It shows how all the wasi
syscalls could be ergonomically bound in Rust, and they offer a possible
implementation of primitives like `std::fs::File` if we bind wasi file
descriptors exactly.

Apart from the standard library, there's also the matter of how this
target is integrated with respect to its C standard library. The
reference sysroot, for example, provides managment of standard unix file
descriptors and also standard APIs like `open` (as opposed to the
relative `openat` inspiration for the wasi ssycalls). Currently the
standard library relies on the C sysroot symbols for operations such as
environment management, process exit, and `read`/`write` of stdio fds.
We want these operations in Rust to be interoperable with C if they're
used in the same process. Put another way, if Rust and C are linked into
the same WebAssembly binary they should work together, but that requires
that the same C standard library is used.

We also, however, want the `wasm32-unknown-wasi` target to be
usable-by-default with the Rust compiler without requiring a separate
toolchain to get downloaded and configured. With that in mind, there's
two modes of operation for the `wasm32-unknown-wasi` target:

1. By default the C standard library is statically provided inside of
   `liblibc.rlib` distributed as part of the sysroot. This means that
   you can `rustc foo.wasm --target wasm32-unknown-unknown` and you're
   good to go, a fully workable wasi binary pops out. This is
   incompatible with linking in C code, however, which may be compiled
   against a different sysroot than the Rust code was previously
   compiled against. In this mode the default of `rust-lld` is used to
   link binaries.

2. For linking with C code, the `-C target-feature=-crt-static` flag
   needs to be passed. This takes inspiration from the musl target for
   this flag, but the idea is that you're no longer using the provided
   static C runtime, but rather one will be provided externally. This
   flag is intended to also get coupled with an external `clang`
   compiler configured with its own sysroot. Therefore you'll typically
   use this flag with `-C linker=/path/to/clang-script-wrapper`. Using
   this mode the Rust code will continue to reference standard C
   symbols, but the definition will be pulled in by the linker configured.

Alright so that's all the current state of this PR. I suspect we'll
definitely want to discuss this before landing of course! This PR is
coupled with libc changes as well which I'll be posting shortly.

[LINK]:
[wasmtime]:
</content>
</entry>
</feed>
