See this issue in Kestrel.
This is what I do from my OSX environment.
$ ./build.sh -x64 -checked -skiptests
use std::borrow::Cow; | |
use std::ops::Deref; | |
// - Codegen once - | |
#[derive(Debug)] | |
pub struct Body<'a>(Cow<'a, [u8]>); | |
impl <'a> From<Vec<u8>> for Body<'a> { |
See this issue in Kestrel.
This is what I do from my OSX environment.
$ ./build.sh -x64 -checked -skiptests
Using perf:
$ perf record -g binary
$ perf script | stackcollapse-perf.pl | rust-unmangle | flamegraph.pl > flame.svg
NOTE: See @GabrielMajeri's comments below about the
-g
option.
pub struct Url<'a>(&'a str); | |
pub struct Body<R>(R); | |
type DefaultBody = &'static [u8]; | |
impl<R> Body<R> { | |
pub fn new(inner: R) -> Self { | |
Body(inner) | |
} |
Debug Rust binary size on Linux:
nm -S target/release/my-binary \
| awk '{
print $4 |& "rustfilt";
"rustfilt" |& getline id;
sub(/::h[0-9a-f]{16}$/, "", id);
sums[id] += strtonum("0x"$2);
counts[id] += 1
extern crate memmap; | |
extern crate tempdir; | |
use std::path::PathBuf; | |
use std::fs::{File, remove_file}; | |
use std::io::Write; | |
use std::str; | |
use tempdir::TempDir; | |
use memmap::{Mmap, Protection}; |
Visual Studio ships with its own version of the .NET Core SDK. You can point Visual Studio at a different version of the SDK by setting the MSBuildSdksPath
environment variable to the appropriate location before launching Visual Studio. For example: %localappdata%\Microsoft\dotnet\sdk\2.0.0-preview1-005783\Sdks
.
#[macro_use] extern crate serde_derive; | |
#[macro_use] extern crate serde_json; | |
extern crate serde; | |
pub mod aggs { | |
use std::slice::Iter; | |
use std::borrow::Cow; | |
use std::collections::BTreeMap; | |
use serde::{Deserialize, Deserializer}; | |
use serde_json::{Value, Map}; |
This post is my personal retrospective of the libz blitz and my part in it. It's also a loose response to the [#Rust2018
call for blog posts] and a chance to show off my amazingly poor drawing skills. For the part most relevant to #Rust2018
, see the last section.
For those who aren't familiar, the libz blitz was an initiative run by Rust's libs team in 2017 to address that year's roadmap goal of raising a solid core of the Rust crate ecosystem to a consistent level of completeness and quality. Specifically it aimed to improve the ecosystem maturity by evaluating and pushing a core set of crates to 1.0
stability. For more details, see [the original Rust Libz Blitz b
In this post I'd like to explore the quality libraries aspect of the [Rust 2018 roadmap RFC]. I'll lay out the framework that underpins my perspective on open source development as a starting point for conversation.
Quality means dependability. It also means a bunch of other things, but I'd like to focus on dependability here. The roadmap discusses sharpening Rust's offerings in a few focus domains, and I think a key to doing that is by supporting the dependability of libraries that fit within them.
What exactly is dependability though? I think a dependable library consists of: