Skip to content

Instantly share code, notes, and snippets.

@Xanewok
Xanewok / cargo_plan.diff
Created October 22, 2018 09:20
Diff of dry-run --build-plan and actual-run --build-plan on Cargo itself
diff --git a/cargo_plan_simple.pretty.json b/cargo_plan.pretty.json
index 479c2a8..7ff6bda 100644
--- a/cargo_plan_simple.pretty.json
+++ b/cargo_plan.pretty.json
@@ -992,7 +992,8 @@
11
],
"inputs": [
- "/home/xanewok/.cargo/registry/src/github.com-1ecc6299db9ec823/libz-sys-1.0.23/build.rs"
+ "/home/xanewok/.cargo/registry/src/github.com-1ecc6299db9ec823/libz-sys-1.0.23/build.rs",
diff --git a/src/build/rustc.rs b/src/build/rustc.rs
index 4ea387f..a3effa7 100644
--- a/src/build/rustc.rs
+++ b/src/build/rustc.rs
@@ -161,9 +161,8 @@ fn clippy_after_parse_callback(state: &mut ::rustc_driver::driver::CompileState<
);
registry.args_hidden = Some(Vec::new());
- // TODO handle clippy toml config
- let empty_clippy_conf = clippy_lints::Conf::default();
C:\Users\Xanewok\Documents\rust>python x.py build src/tools/rls --build=x86_64-pc-windows-msvc
Updating only changed submodules
Submodules updated in 0.13 seconds
Finished dev [unoptimized] target(s) in 0.36s
Building stage0 std artifacts (x86_64-pc-windows-msvc -> x86_64-pc-windows-msvc)
Finished release [optimized] target(s) in 0.56s
Copying stage0 std from stage0 (x86_64-pc-windows-msvc -> x86_64-pc-windows-msvc / x86_64-pc-windows-msvc)
Building stage0 test artifacts (x86_64-pc-windows-msvc -> x86_64-pc-windows-msvc)
Finished release [optimized] target(s) in 0.41s
Copying stage0 test from stage0 (x86_64-pc-windows-msvc -> x86_64-pc-windows-msvc / x86_64-pc-windows-msvc)
{
"inputs": [
"/home/xanewok/.cargo/git/checkouts/cargo-e7ff1db891893a9e/af9e40c/Cargo.toml",
"/home/xanewok/.cargo/git/checkouts/cargo-e7ff1db891893a9e/af9e40c/src/crates-io/Cargo.toml",
"/home/xanewok/.cargo/git/checkouts/rust-clippy-96f6c8ce0bc85cf5/1f65617/clippy_lints/Cargo.toml",
"/home/xanewok/.cargo/git/checkouts/rustfmt-5390e0ead582d971/7e3dc8f/Cargo.toml",
"/home/xanewok/.cargo/registry/src/github.com-1ecc6299db9ec823/aho-corasick-0.6.6/Cargo.toml",
"/home/xanewok/.cargo/registry/src/github.com-1ecc6299db9ec823/ansi_term-0.11.0/Cargo.toml",
"/home/xanewok/.cargo/registry/src/github.com-1ecc6299db9ec823/arrayvec-0.4.7/Cargo.toml",
"/home/xanewok/.cargo/registry/src/github.com-1ecc6299db9ec823/atty-0.2.11/Cargo.toml",
unsafe extern fn readPixels(cx: *mut JSContext, _obj: HandleObject, this: *const WebGLRenderingContext, args: *const JSJitMethodCallArgs) -> bool {
return wrap_panic(panic::AssertUnwindSafe(|| {
let this = &*this;
let args = &*args;
let argc = args._base.argc_;
if argc < 7 {
throw_type_error(cx, "Not enough arguments to \"WebGLRenderingContext.readPixels\".");
return false;
}
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#![cfg(feature = "debugmozjs")]
#![allow(unused_imports)]
#[macro_use]
extern crate mozjs;
use mozjs::jsapi::CompartmentOptions;
#[test]
fn sequence_rooter() {
let rt = Runtime_::new().unwrap();
let cx = rt.cx();
JS_SetGCZeal(rt, 2, 1);
unsafe {
rooted!(in(cx) let global =
JS_NewGlobalObject(cx, &SIMPLE_GLOBAL_CLASS, ptr::null_mut(),

Implement MutationObserver API

Background information: The DOM standard defines a MutationObserver API that allows web content to receive callbacks when the page contents are mutated. The goal of this work is to implement the fundamental pieces required to support this API.

Tracking issue: servo/servo#6633 (please ask questions here)

Initial steps:

create the MutationObserver and MutationRecord interfaces with stub method implementations (:warning: TODO: implement void disconnect();, sequence<MutationRecord> takeRecords();)

@Xanewok
Xanewok / Bio
Last active July 31, 2017 23:48
Igor is studying Computer Science at the University of Warsaw, Poland. Having
worked on a AAA game and various smaller ones, he grew tired of the
repetitiveness of the process and started a journey to find a language that
would aid in building better abstractions. He discovered Rust and
decided to help further the IDE story, so the development process would be
more enjoyable. He was accepted onto the Google Summer of Code 2017
as a student and has been working to improve the RLS and IDE support.
Teaching an IDE to understand Rust
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Abstract
IDE support is one of Rust's most requested features. From the 2017 State of Rust Survey: roughly 30% of Rust users are looking forward to IDE support more than any other feature in 2017 and for 22% of non-users, lack of IDE support is their main reason for not using Rust.
In this talk, I'll cover what it took to support Cargo workspaces in the RLS and I'll explain how the RLS leverages
existing tooling, including Cargo and the compiler. I'll demonstrate the current state of Rust programming with an IDE, and how you can benefit from using an IDE with your Rust projects.
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Details