Rust 2018 All Hands!

Thursday recap

Compiler

  • Looked at compile times for the Stylo crate
    • Best way forward: generate less code for LLVM to build
      • MIR-only rlibs
      • parallelization in rustc

libsyntax2

  • Design constraints for a new version of libsyntax
  • No particular timeline here, but we do want to think about impact on proc macro stabilization

Cargo

  • Custom registries: basically ready to stabilize
  • Profiles: v2 design is clear
    • simplify down to Dev and Release for the 2018 edition
    • move out things like rpath, which are more workstation-relevant
  • Public deps
    • Major change of plans here:
      • Improve rustc errors on incompatible types from different versions of the same crate (e.g. serde(1.0)::Serialize
      • Allow crate authors to label deps as private, which enables a lint
      • Change resolution heuristics to favor fewer duplicates where possible
  • Build system integration
    • Analyzed RLS needs
    • Let’s add a minimal notion of build plans, even if they just provide rustc invocations with command-line arguments. We can iterate later about how to provide higher-level metadata rather than just rustc command lines.
    • Let’s add a minimal implementation of metabuild, and we can iterate later on how to implement the individual build crates in the ecosystem (e.g. parsing Cargo.toml or finding native libraries), as well as on better interfaces to those build crates.

WG: wasm

  • How to reduce code size bloat around panics
    • Worked through a bunch of wild ideas
    • Ended up working through a simple case
      • Started at 44k, just to panic
      • Now: 350 bytes
  • wasm-bindgen now works with commonjs (i.e. in node)

Unsafe code guidelines

  • Made a plan to draft a reference about the questions around unsafe code, and what is known and unknown about their answers
    • thread::abort
    • Places where we’re not sure yet — you shouldn’t do them, but others might
    • Will help organize future investigations as well
  • Statics, consts, and Sync
    • Came up with a bug fix that may be needed for soundness
  • Drilled down into a potential model for aliasing
  • Then Ralf and Julian holed themselves away for hours and hopefully Thought Deep Thoughts
    • Focused mainly on valgrind integration

WG: net

Five things we plan to do:

  1. Hasty: small blocking web server, intended for learning when you’re new to Rust
  2. Tyger: stable API over hyper providing the interfaces we need; want to reach 1.0 for the 2018 edition
  3. Build middleware based on Tower’s interfaces
  4. Improve debugging for futures based on a combination of backtraces (for async/await) and explicit bread crumbs
  5. Documentation
  • Async Programming in Rust book
  • Hasty guide
  • Middleware construction guide

Tools (custom test frameworks)

  • we have an eRFC open for a while: https://github.com/rust-lang/rfcs/pull/2318
    • nearly in FCP
    • worked through and reached consensus on a lot of the details
  • discussed procedural macro design for writing frameworks
    • whole crate proc macros
    • helper crates to get people started
  • Cargo integration is basically settled
  • Common test output crate will begin as “what libtest does” as a crate, get own RFC later on
  • see Rust 2018 All Hands — Custom Test Frameworks for details

Docs

HolyJit

  • 99 bottles of beer working in the JIT-ed brainfuck code.
  • eddyb is enthusiastic! (Mission complete)
11 Likes