Commit Graph

105 Commits

Author SHA1 Message Date
Jethro Beekman 67eabc6bec SGX target: Expose thread id function in os module 2019-03-05 13:35:57 -08:00
Taiki Endo 93b6d9e086 libstd => 2018 2019-02-28 04:06:15 +09:00
kennytm b3f814fd30 Rollup merge of #58182 - jethrogb:jb/sgx-bytebuffer-len-0, r=joshtriplett
SGX target: handle empty user buffers correctly

Also, expose correct items in `os::fortanix_sgx::usercalls::alloc`

* [read_alloc documentation](https://edp.fortanix.com/docs/api/fortanix_sgx_abi/struct.Usercalls.html#method.read_alloc)
* [Clarified ByteBuffer documentation](https://github.com/fortanix/rust-sgx/pull/94/files#diff-ca843ad9e25cacd63a80579c0f7efa56)

r? @joshtriplett
2019-02-06 00:29:20 +09:00
Jethro Beekman d89ebdd475 Expose correct items in os::fortanix_sgx::usercalls::alloc 2019-02-05 16:19:20 +05:30
Jethro Beekman a90b23fd30 Fix std::os::fortanix_sgx::usercalls::raw::UsercallNrs
Fixes https://github.com/fortanix/rust-sgx/issues/88
2019-02-01 13:58:49 +05:30
Jethro Beekman 8db59d49f3 Add os::fortanix_sgx::ffi module 2019-01-23 18:53:39 +05:30
bors d2986970ad Auto merge of #57119 - jethrogb:jb/sgx-os-mod2, r=joshtriplett
Add `io` and `arch` modules to `std::os::fortanix_sgx`

This PR adds two more (unstable) modules to `std::os::fortanix_sgx` for the `x86_64-fortanix-unknown-sgx` target.

### io
`io` allows conversion between raw file descriptors and Rust types, similar to `std::os::unix::io`.

### arch
`arch` exposes the `ENCLU[EREPORT]` and `ENCLU[EGETKEY]` instructions. The current functions are very likely not going to be the final form of these functions (see also https://github.com/fortanix/rust-sgx/issues/15), but this should be sufficient to enable experimentation in libraries. I tried using the actual types (from the [`sgx-isa` crate](https://crates.io/crates/sgx-isa)) instead of byte arrays, but that would make `std` dependent on the `bitflags` crate which I didn't want to do at this time.
2018-12-27 09:21:06 +00:00
Mark Rousskov 2a663555dd Remove licenses 2018-12-25 21:08:33 -07:00
Jethro Beekman be565615db Add io and arch modules to std::os::fortanix_sgx 2018-12-25 13:11:04 +05:30
Jethro Beekman dcb5db80b2 Add std::os::fortanix_sgx module 2018-12-20 10:09:52 +05:30
Jethro Beekman f72f28fae2 Show platform-specific modules in std::os when building those platforms 2018-12-19 11:53:40 +05:30
myfreeweb 67e7181199 Add FreeBSD unsigned char platforms to std::os::raw
Reference: https://www.freebsd.org/cgi/man.cgi?query=arch&apropos=0&sektion=7
2018-12-09 01:37:57 +03:00
ariasuni ec3ac112e1 Make std::os::unix/linux::fs::MetadataExt::a/m/ctime* documentation clearer 2018-11-22 02:36:11 +01:00
Isaac Woods 23e345bc0c Move std::os::raw::c_void into libcore and re-export in libstd 2018-09-14 16:19:59 +01:00
kennytm d0f8cf32b3 Rollup merge of #53076 - QuietMisdreavus:cfg-rustdoc, r=GuillaumeGomez
set cfg(rustdoc) when rustdoc is running on a crate

When using `#[doc(cfg)]` to document platform-specific items, it's a little cumbersome to get all the platforms' items to appear all at once. For example, the standard library adds `--cfg dox` to rustdoc's command line whenever it builds docs, and the documentation for `#![feature(doc_cfg)]` suggests using a Cargo feature to approximate the same thing. This is a little awkward, because you always need to remember to set `--features dox` whenever you build documentation.

This PR proposes making rustdoc set `#[cfg(rustdoc)]` whenever it runs on a crate, to provide an officially-sanctioned version of this that is set automatically. This way, there's a standardized way to declare that a certain version of an item is specifically when building docs.

To try to prevent the spread of this feature from happening too quickly, this PR also restricts the use of this flag to whenever `#![feature(doc_cfg)]` is active. I'm sure there are other uses for this, but right now i'm tying it to this feature. (If it makes more sense to give this its own feature, i can easily do that.)
2018-09-01 23:18:41 +08:00
QuietMisdreavus ad2169c095 use cfg(rustdoc) instead of cfg(dox) in std and friends 2018-08-31 13:29:10 -05:00
Corey Farwell e477a13d63 Replace usages of 'bad_style' with 'nonstandard_style'.
`bad_style` is being deprecated in favor of `nonstandard_style`:

- https://github.com/rust-lang/rust/issues/41646
2018-08-29 09:01:35 -05:00
Jonathan A. Kollasch 1dd53f73b2 Add aarch64-unknown-netbsd target 2018-08-07 12:03:42 -05:00
Jonathan A. Kollasch b011b091cb NetBSD: fix signedess of char 2018-08-06 12:20:10 -05:00
Colin Finck e50f4eeaad Add targets for HermitCore (https://hermitcore.org) to the Rust compiler and port libstd to it.
As a start, the port uses the simplest possible configuration (no jemalloc, abort on panic)
and makes use of existing Unix-specific code wherever possible.
It adds targets for x86_64 (current main HermitCore platform) and aarch64 (HermitCore platform
under development).

Together with the patches to "liblibc" and "llvm", this enables HermitCore applications to be
written in Rust.
2018-07-30 15:50:51 +02:00
Dylan MacKenzie 182d99cfd1 Add doc links to std::os extension traits
Add documentation links to the original type for various OS-specific
extension traits and normalize the language for introducing such traits.
Also, remove some outdated comments around the extension trait
definitions.
2018-04-14 15:32:24 -07:00
Corey Farwell e9dcec070d Remove hidden foo functions from doc examples; use Termination trait.
Fixes https://github.com/rust-lang/rust/issues/49233.
2018-03-28 13:15:05 +02:00
QuietMisdreavus fefd5e9bbc fix docs link 2018-02-06 09:26:15 -06:00
Clar Charr 2cab06855a Reworded to avoid fuzziness, mention ! in c_void docs. 2018-01-29 18:15:59 -05:00
Clar Charr 853fa5873c Revisions suggested in comments 2018-01-29 17:44:12 -05:00
Clar Charr 1a043533f5 Document std::os::raw. 2018-01-29 17:44:12 -05:00
Sébastien Marie 8c7b0938c2 add aarch64-unknown-openbsd support
- make liblibc to point to libc with aarch64-unknown-openbsd
- make c_char (in std::os::raw) to point to right value
2017-12-17 19:48:31 +01:00
Alex Crichton 48996f9e75 rustbuild: Enable WebAssembly backend by default
This commit alters how we compile LLVM by default enabling the WebAssembly
backend. This then also adds the wasm32-unknown-unknown target to get compiled
on the `cross` builder and distributed through rustup. Tests are not yet enabled
for this target but that should hopefully be coming soon!
2017-11-25 06:44:35 -08:00
Guillaume Gomez e42da901a8 Fix doc build on other architectures than linux 2017-10-24 21:58:53 +02:00
Guillaume Gomez 3507b2b26b Add missing code examples 2017-10-19 13:40:45 +02:00
est31 aad1c998c7 Remove nacl from libstd 2017-10-05 05:01:41 +02:00
Tobias Schaffner 9bbc6dbde3 Add modifications needed for L4re in libstd
This commit adds the needed modifications to compile the std crate
for the L4 Runtime environment (L4Re).

A target for the L4Re was introduced in commit:
c151220a84

In many aspects implementations for linux also apply for the L4Re
microkernel.

Two uncommon characteristics had to be resolved:
* L4Re has no network funktionality
* L4Re has a maximum stacksize of 1Mb for threads

Co-authored-by: Sebastian Humenda <sebastian.humenda@tu-dresden.de>
2017-09-08 14:36:56 +02:00
Sebastian Humenda 2cf0a4ad46 Match c_char definitions and enable signal reset for L4Re
*   Match definition of c_char in os/raw.rs with the libc definition

    Due to historic reasons, os/raw.rs redefines types for c_char from
    libc, but these didn't match. Now they do :).

*   Enable signal reset on exec for L4Re

    L4Re has full signal emulation and hence it needs to reset the
    signal set of the child with sigemptyset. However, gid and uid
    should *not* be set.
2017-09-08 14:36:56 +02:00
Alex Crichton e5b123cba2 Update the libc submodule
Brings in a few fixes for wasm/asmjs
2017-08-28 07:58:19 -07:00
kennytm b4114ebe3a Exposed all platform-specific documentation. 2017-08-10 13:43:59 +08:00
Danek Duvall bdb53e55b0 Fix the Solaris pthread_t raw type in std to match what's in libc
The old type causes failures when building cargo 0.20.0 after
changeset 8304e06b5 in the libc repo.
2017-08-01 12:38:36 -07:00
Marco A L Barbosa 51cc0e38e3 Add x86_64-linux-android target 2017-04-20 16:29:59 -03:00
Camille TJHOA b36cff5c4f Improve os::linux documentation (#29367) 2017-03-29 23:44:39 +02:00
Marco A L Barbosa a7add43389 Fix c_char (u8 -> i8) definition for i686-linux-android 2017-03-25 11:03:06 -03:00
Corey Farwell 97a1b6a055 Update usages of 'OSX' (and other old names) to 'macOS'.
As of last year with version 'Sierra', the Mac operating system is now
called 'macOS'.
2017-03-12 14:59:04 -04:00
Oliver Middleton 9128f6100c Fix a few impl stability attributes
The versions show up in rustdoc.
2017-01-29 13:31:47 +00:00
Jorge Aparicio 728ec85e9a sparc64-linux support 2016-12-30 20:46:19 -05:00
Alex Crichton 214a6c6166 Fix compile errors and such 2016-12-20 14:09:50 -08:00
Corey Farwell 86fc63e62d Implement fmt::Debug for all structures in libstd.
Part of https://github.com/rust-lang/rust/issues/31869.

Also turn on the `missing_debug_implementations` lint at the crate
level.
2016-12-18 14:55:14 -08:00
Jeremy Soller 25e1a4a008 Use target_os = redox for cfg 2016-11-10 20:13:14 -07:00
Jeremy Soller 123d08b3d3 Merge branch 'master' of https://github.com/rust-lang/rust into redox 2016-10-31 09:40:24 -06:00
Jeremy Soller 8b09e01fef Add redox system 2016-10-27 20:57:49 -06:00
Raph Levien c4651dba5f Support for aarch64 architecture on Fuchsia
This patch adds support for the aarch64-unknown-fuchsia target. Also
updates src/liblibc submodule to include required libc change.
2016-10-24 16:58:35 -07:00
Raph Levien cea61408c3 Update libc submodule with corresponding fuchsia changes
Also trim os::fuchsia::raw architectures.
2016-10-22 07:08:07 -07:00
Raph Levien 76bac5d33e Add Fuchsia support
Adds support for the x86_64-unknown-fuchsia target, which covers the
Fuchsia operating system.
2016-10-22 07:08:06 -07:00