1. 01 Apr, 2019 1 commit
  2. 30 Mar, 2019 1 commit
  3. 29 Mar, 2019 1 commit
    • Alex Crichton's avatar
      Add a new wasm32-unknown-wasi target · ace71240
      Alex Crichton authored
      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]:
      ace71240
  4. 27 Mar, 2019 3 commits
  5. 26 Mar, 2019 1 commit
  6. 21 Mar, 2019 1 commit
  7. 20 Mar, 2019 1 commit
  8. 19 Mar, 2019 2 commits
  9. 18 Mar, 2019 1 commit
  10. 16 Mar, 2019 1 commit
  11. 13 Mar, 2019 1 commit
  12. 10 Mar, 2019 1 commit
  13. 08 Mar, 2019 1 commit
  14. 04 Mar, 2019 2 commits
  15. 03 Mar, 2019 2 commits
  16. 02 Mar, 2019 1 commit
  17. 01 Mar, 2019 2 commits
  18. 28 Feb, 2019 1 commit
  19. 26 Feb, 2019 3 commits
  20. 22 Feb, 2019 1 commit
    • Bastien Orivel's avatar
      Update parking_lot to 0.7 · a82f0ce5
      Bastien Orivel authored
      Unfortunately this'll dupe parking_lot until the data_structures crate
      is published and be updated in rls in conjunction with crossbeam-channel
      a82f0ce5
  21. 19 Feb, 2019 1 commit
  22. 18 Feb, 2019 1 commit
  23. 14 Feb, 2019 1 commit
  24. 05 Feb, 2019 1 commit
  25. 04 Feb, 2019 1 commit
  26. 03 Feb, 2019 1 commit
  27. 01 Feb, 2019 1 commit
  28. 30 Jan, 2019 2 commits
    • James Munns's avatar
      Update to newer version of mdbook(2) · de76369f
      James Munns authored
      de76369f
    • Matthias Krüger's avatar
      submodules: update clippy from f1753522 to 6ce78d12 · a27cf8a2
      Matthias Krüger authored
      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
      ````
      a27cf8a2
  29. 28 Jan, 2019 2 commits
  30. 27 Jan, 2019 1 commit