Skip to content

Instantly share code, notes, and snippets.

View rust-blockchain-newbie-response.md

Hi, everyone! Super happy to reach out to you! As a Rustacean, I’ll be grateful for your advice. Due to the war in Ukraine, I’m working on becoming a junior Rust software engineer ASAP. As an anti-corruption activist, I have to relocate from Russia. Because of the war, I’ve lost my family & my livelihood.

But I’m not here to tell a sob story, I’m here to ask the practical questions. I could start my new career as a JavaScript front end guy, but JS doesn't suit my personality, while Rust does. With Rust, I’ll love my work, but with JS — less so.

Unless it’s impossible to go from 0 to a Rust junior job in 1-2 years or faster, I would do everything to choose Rust over JS.

Questions:

  1. Which Blockchain ecosystem should I choose? NEAR? Solana? Polkadot (Ink)? Cosmos? Holochain? Priority #1 is — in which ecosystem I’ll meet the kindest&smartest colleagues? Priority #2 is — which ecosystem has the best learning resources for beginners? (Though, if there’s no great learning resources, but there’s a feasible path
View a.txt
ubuntu@ip-172-30-0-140:~/tikv4$ rustc -V
rustc 1.44.0-nightly (b2e36e6c2 2020-04-22)
ubuntu@ip-172-30-0-140:~/tikv4$ RUSTFLAGS="-Zsanitizer=address" cargo test -p tikv_util --target=x86_64-unknown-linux-gnu -- batch_rec
Finished test [unoptimized + debuginfo] target(s) in 1.30s
Running target/x86_64-unknown-linux-gnu/debug/deps/tikv_util-691515b7c083429f
running 1 test
test mpsc::batch::tests::test_batch_receiver ... ok
View rust-adoption-notes.md

2020-02-24

Some notes about the question "who is actually using Rust?".

  • Firefox

  • Dropbox's storage backend is in Rust, probably other components as well

  • Reddit uses Rust on every request for markdown parsing

View a.txt
crates.io has https://github.com/rust-lang/crates.io/blob/master/docs/MIRROR.md as some loose docs and I believe there exist tools to sort of manage it for you and also mirror s3, but not sure
https://www.integer32.com/2016/10/08/bare-minimum-crates-io-mirror-plus-one.html
Bare Minimum Crates.io Mirror Plus One
I’ve been interested for a long time in making it easier toset up a mirror of crates.io. Making our vibrant ecosystem of librarieshighly available around the...
static.rust-lang.org measures in the dozens of terabytes range so I don't know if a mirror is really practical to maintain, nor am I sure if it'd be helpful as s3 seems fairly reliable
@brson
brson / time-passes-release.txt
Created Apr 7, 2019
Sum of time passes for tikv release profile 6ff46ed602017597823f5e868a1d37fadfd9ceab
View time-passes-release.txt
LLVM passes - 1773.56
llvm module passes - 892.79
codegen passes - 488.64
LTO passes - 234.98
codegen - 112.45
codegen to LLVM IR - 75.24
ll link - 61.56
item-bodies checking - 47.36
llvm function passes - 28.94
linking - 28.15
@brson
brson / sum-time-passes.txt
Last active Apr 7, 2019
TiKV sum of time-passes for commit 6ff46ed602017597823f5e868a1d37fadfd9ceab (debug build)
View sum-time-passes.txt
codegen passes - 216.57999999999936
codegen - 182.27599999999995
LLVM passes - 154.252
codegen to LLVM IR - 87.03499999999997
item-bodies checking - 68.76499999999999
linking - 42.206
write metadata - 41.588999999999984
running linker - 39.791
borrow checking - 35.21
monomorphization collection - 31.260999999999992
@brson
brson / sum-time-passes.py
Last active Apr 7, 2019
Sum and sort rustc -Ztime-passes
View sum-time-passes.py
import sys
import re
import operator
file = sys.argv[1]
r = re.compile("time: (\S.*); rss: (\S*)\s*(.*)")
map = { }
@brson
brson / sum-time-passes.py
Last active Apr 7, 2019
Script for accumulating and sorting output of rustc --Ztime-passes
View sum-time-passes.py
import sys
import re
import operator
file = sys.argv[1]
r = re.compile("time: (\S.*); rss: (\S*)\s*(.*)")
map = { }
View a.txt
+ cargo benchcmp tikv-1.txt tikv-2.txt
name tikv-1.txt ns/iter tikv-2.txt ns/iter diff ns/iter diff % speedup
coprocessor::codec::batch::lazy_column::benches::bench_lazy_batch_column_by_vec_clone 44,240 45,071 831 1.88% x 0.98
coprocessor::codec::batch::lazy_column::benches::bench_lazy_batch_column_by_vec_push_raw_10bytes 49,509 48,678 -831 -1.68% x 1.02
coprocessor::codec::batch::lazy_column::benches::bench_lazy_batch_column_clone 15,579 15,017 -562 -3.61% x 1.04
coprocessor::codec::batch::lazy_column::benches::bench_lazy_batch_column_clone_10bytes 14,539 14,633 94 0.65% x 0.99
coprocessor::codec::batch::lazy_column::benches::bench_lazy_batch_column_clone_and_decode 35,682 28,494
View dhat.txt
==11220== DHAT, a dynamic heap analysis tool
==11220== NOTE: This is an Experimental-Class Valgrind Tool
==11220== Copyright (C) 2010-2015, and GNU GPL'd, by Mozilla Inc
==11220== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info
==11220== Command: target/debug/comrak -e table -e autolink script/progit.md
==11220==
==11220== error calling PR_SET_PTRACER, vgdb might block
==11220==
==11220== ======== SUMMARY STATISTICS ========
==11220==