Commit graph

106 commits

Author SHA1 Message Date
Mazdak Farrokhzad
e655b91b7a
Rollup merge of #59452 - GuillaumeGomez:speedup-rustdoc, r=QuietMisdreavus
Speed up rustdoc run a bit

r? @QuietMisdreavus
2019-04-02 13:47:25 +02:00
Eric Huss
d2228ca2a5 Update cargo 2019-03-30 09:35:01 -07:00
Alex Crichton
ace71240d2 Add a new wasm32-unknown-wasi target
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]:
2019-03-29 15:58:17 -07:00
Mazdak Farrokhzad
38af98ee5f
Rollup merge of #59454 - topecongiro:rustfmt-1.2.0, r=nrc
Update rustfmt to 1.2.0

This release includes bug fixes and performance improvements from 1.1.0. Also it adds a new rustfmt tool attribute `#[rustfmt::skip::macros]`, which lets you skip formatting macro calls of your choice.

cc @nrc @Centril @Xanewok
2019-03-29 12:32:23 +01:00
Mazdak Farrokhzad
8e0855b5b7
Rollup merge of #59436 - gnzlbg:update_jemalloc, r=alexcrichton
Update jemalloc-sys to version 0.3.0

This PR updates jemalloc-sys from 0.1.8 to 0.3.0.
2019-03-29 12:32:21 +01:00
Guillaume Gomez
7f2c726d6c Speed up rustdoc run a bit 2019-03-27 19:07:48 +01:00
varkor
3683f51352 Update ena to version 0.13.0 2019-03-27 09:44:55 +00:00
varkor
443a2d4f86 Update ena 2019-03-27 09:44:55 +00:00
topecongiro
c728ae0fd1 Update rustfmt to 1.2.0 2019-03-27 10:42:13 +09:00
gnzlbg
b73886d947 Update Cargo.lock 2019-03-26 13:10:54 +01:00
Mazdak Farrokhzad
4fbe25cc6b
Rollup merge of #59315 - Zoxc:move-query, r=oli-obk
Add no_hash to query macro and move some queries over

r? @oli-obk
2019-03-26 09:05:44 +01:00
MikaelUrankar
6b766baf4a Update cargo 2019-03-21 17:02:28 +01:00
John Kåre Alsaker
72f8d4e222 Add no_hash to query macro and move some queries over 2019-03-20 16:06:09 +01:00
gnzlbg
144bdc6830 Directly reference the roadmap upstream 2019-03-19 13:58:48 +01:00
gnzlbg
6dbb5f7104 Update Cargo.lock 2019-03-19 13:58:47 +01:00
Mateusz Mikuła
986f88b86e Update Clippy, RLS and Rustfmt 2019-03-18 18:34:18 +01:00
bjorn3
ca2ff089f3 Remove MetadataOnlyCodegenBackend 2019-03-16 10:54:38 +01:00
Eric Huss
4543245621 Update cargo 2019-03-13 08:00:43 -07:00
Mazdak Farrokhzad
2049d6f4d4
Rollup merge of #58908 - JohnTitor:improve-rand, r=scottmcm
Update rand version

cc: #57724

r? @scottmcm
2019-03-13 03:33:37 +01:00
Mazdak Farrokhzad
445c4bc0f8
Rollup merge of #58829 - Xanewok:scoped-tls, r=Zoxc
librustc_interface: Update scoped-tls to 1.0

Done previously as a part of https://github.com/rust-lang/rust/pull/58748.

r? @Zoxc
2019-03-13 03:33:34 +01:00
Igor Matuszewski
9a6a269d56 Bump Clippy and RLS 2019-03-10 17:03:32 +01:00
Eric Huss
9243f9c6f2 Update cargo, rls 2019-03-08 12:07:13 -08:00
John Kåre Alsaker
74b6419bb6 Update Cargo.lock 2019-03-05 00:36:25 +01:00
Yuki Okushi
939a263974 Update rand version 2019-03-04 16:20:46 +09:00
Igor Matuszewski
594e2616db Update Clippy 2019-03-03 23:51:24 +01:00
Wesley Wiser
25b8c614f0 Wrap the self-profiler in an Arc<Mutex<>>
This will allow us to send it across threads and measure things like
LLVM time.
2019-03-03 10:07:29 -05:00
Santiago Pastorino
ddd4731f5f
Update miri 2019-03-02 20:21:33 -03:00
Igor Matuszewski
204f087daf librustc_interface: Update scoped-tls to 1.0
Done previously as a part of
https://github.com/rust-lang/rust/pull/58748
2019-03-01 10:18:53 +01:00
John Kåre Alsaker
5c78fa836d Update Cargo.lock 2019-03-01 01:30:52 +01:00
John Kåre Alsaker
23a51f91c9 Introduce rustc_interface and move some methods there 2019-02-28 19:30:31 +01:00
Mazdak Farrokhzad
0c871fa2bd
Rollup merge of #58752 - taiki-e:update-string_cache_codegen, r=alexcrichton
Update string_cache_codegen to 0.4.2

This removes two dependencies of the old version (string_cache is already the latest version).
2019-02-27 13:32:33 +01:00
Mazdak Farrokhzad
a20c2fdd47
Rollup merge of #58748 - hellow554:scoped_tls, r=estebank
update scoped_tls to 1.0

scoped_tls has been updated to version 1.0
This PR will hopefully merge flawlessly :)

This fixes, among others, https://github.com/alexcrichton/scoped-tls/issues/9

Note, that the nightly feature has been removed in 64bd7b84a1
2019-02-27 13:32:29 +01:00
Taiki Endo
6375efc822 Update string_cache_codegen to 0.4.2 2019-02-26 20:06:31 +09:00
Marcel Hellwig
56fb2873fe update Cargo.lock 2019-02-26 11:15:52 +01:00
Jethro Beekman
6c44bbbbaa Update dlmalloc to 0.1.3 2019-02-26 09:18:22 +09:00
Bastien Orivel
a82f0ce54b Update parking_lot to 0.7
Unfortunately this'll dupe parking_lot until the data_structures crate
is published and be updated in rls in conjunction with crossbeam-channel
2019-02-22 13:49:19 +01:00
Ralf Jung
7596a10225 update Cargo.lock and miri URL 2019-02-19 21:54:49 +01:00
flip1995
4c228cc9b8
Update Cargo.lock 2019-02-18 10:32:58 +01:00
Eduard-Mihai Burtescu
f04424acd1 rustc_mir: compute all the qualification bits separately in qualify_consts. 2019-02-14 13:36:51 +02:00
Guillaume Gomez
a74e4f7fd5
Rollup merge of #58157 - h-michael:cargo-lock, r=alexcrichton
Add Cargo.lock automatically adding message

If I execute `cargo +nightly fix`, this change always occurs; cc #58099
r? @Centril
2019-02-10 21:45:11 +01:00
Guillaume Gomez
4c62d7e6f1
Rollup merge of #57884 - GuillaumeGomez:update-minifier-array, r=QuietMisdreavus
Update minifier version

Should fix #57754 (at least it's a bit faster on my computer).

The whole point of this update is to create a huge array instead of creating a lot of variables.

r? @QuietMisdreavus
2019-02-07 14:28:30 +01:00
Eric Huss
55917ba0e7 Update cargo 2019-02-05 11:17:23 -08:00
Hirokazu Hata
bd4df0c6dd Add Cargo.lock automatically adding message 2019-02-05 01:31:48 +09:00
Hirokazu Hata
6e72077b3b submodule: update rls from c9d25b667a to f331ff7 2019-02-03 09:48:18 +09:00
Aaron Hill
afb1921c79
Fixup code 2019-02-01 09:43:55 -05:00
James Munns
de76369f93 Update to newer version of mdbook(2) 2019-01-30 09:25:12 -05:00
Matthias Krüger
a27cf8a281 submodules: update clippy from f1753522 to 6ce78d12
Changes:
````
wildcard_match_arm: Update lint count.
wildcard_match_arm: add nesting issue to known.
wildcard_match_arm: lint only enum matches.
wildcard_match_arm: update ui test stderr
wildcard_match_arm: format test.
wilcard_match_arm: run rustfmt.
wildcard_match_arm: add lint properly.
wildcard_match_arm: rename function.
wildcard_match_arm: add simple ui test.
wildcard_match_arm: expand lint scope.
Change match_wild lint name to WILDCARD_MATCH_ARM.
Add match_wild lint (#3649).
fetch_prs_between: add .sh file ending
cargo fmt
Update various docs
Use built-in entry_fn detection over self-built
cargo fmt
Reorganize conditionals: Run faster checks first
Maybe fix ICE?
Add initial version of const_fn lint
Fix `unit_arg` false positive
Rustfmt
Check hypothetically failing conversion
Remove tests for deprecated items
Update more changed iterator paths
Atomics constants are now handled by the deprecation lint
Update changed iterator paths
Update const slice processing
update test stderr
run cargo fmt
rustup https://github.com/rust-lang/rust/pull/57907/
Fix documentation for `slow_vector_initialization`
rustup https://github.com/rust-lang/rust/pull/57726
Remove unsafe_vector_initialization from added lints
Prevent incorrect cast_lossless suggestion in const_fn
Incorporate review suggestions
Fix dogfood tests on Appveyor
test(versioncheck): Use .no_deps()
test(versioncheck): Fix version equality check
chore(cargo/dependencies/cargo-metadata): Upgrade to 0.7.1
dependencies: update itertools from 0.7 to 0.8
Add script to fetch GitHub PRs between two commits
gitattributes: Treat .fixed files as rust files
Update changelog with all changes since 0.0.212
Fix `expect_fun_call` lint suggestions
````
2019-01-30 01:25:05 +01:00
John Kåre Alsaker
975eb312ef Use multiple threads by default. Limits tests to one thread. Do some renaming. 2019-01-28 16:24:33 +01:00
John Kåre Alsaker
1bdd2f699b Conditionally skip two passes if their related attributes were not found 2019-01-28 05:46:53 +01:00
Mark Rousskov
cd39cf748e Update cargo to fix deprecation warnings
Implemented in rust-lang/cargo#6600
2019-01-27 08:54:56 -07:00