Daily Weekly Monthly

Daily Shaarli

All links of one day in a single page.

February 14, 2019

sharkdp/bat: A cat(1) clone with wings.

A cat(1) clone with syntax highlighting and Git integration.

A chaque sprint sa rétrospective (REX) | Agile Mouse

Aller un bon REX ca fait pas de mal ! ( meme en famille ou entre amis parfois... )

GitHub - clux/muslrust: Docker environment for building musl based static rust binaries

A plain docker environment for building static binaries compiled with rust and linked against musl instead of glibc. Built nightly on travis.

This is only useful if you require external C dependencies, because otherwise you could do rustup target add x86_64-unknown-linux-musl.

This container comes with a bunch of statically compiled C libraries using musl-gcc so that we can statically link against these as well.

If you already have rustup installed on the machine that should compile, you might consider cross as a more general solution for cross compiling rust binaries.
Usage

Pull and run from a rust project root:

docker pull clux/muslrust
docker run -v $PWD:/volume --rm -t clux/muslrust cargo build

You should have a static executable in the target folder:

ldd target/x86_64-unknown-linux-musl/debug/EXECUTABLE
not a dynamic executable

From there on, you can include it in a blank docker image (because everything you need is included in the binary) and perhaps end up with a 5MB docker blog image.

Rustlog : Why is a Rust executable large?

This post is intended as a tour of various techniques (not necessarily all practical) of reducing program size, but if you demand some conclusion, the pragmatic takeaway is that:

Compile with --release.
Before distribution, enable LTO and strip the binary.
If your program is not memory-intensive, use the system allocator (assuming nightly).
You may be able to use the optimization level s/z in the future as well.
I didn’t mention this because it doesn’t improve such a small program, but you can also try UPX and other executable compressors if you are working with a much larger application.

Via http://nicolas-delsaux.hd.free.fr/Shaarli/?x0e0Fw

Rocket - Simple, Fast, Type-Safe Web Framework for Rust

Meet Rocket.
Rocket is a web framework for Rust that makes it simple to write fast, secure web applications without sacrificing flexibility, usability, or type safety.

Via http://nicolas-delsaux.hd.free.fr/Shaarli/?zszx1Q