Here I collect some interesting links.
cargo environment
Currently I always build all dependencies within th projects own .cargo subdir by setting the environment variable CARGO_HOME.
export CARGO_HOME=./.cargo
Actually I am quite unsure if that is really a good idea because this results in a lot of rebuilds for each new project.
Implement Monads with rust.
Which is currently difficult through impossible, but might be feasible with some small additions to the rust type system, namely «(generic) associated traits.»
Is impl Trait what we needed?
A new language feature which sounded a bit like the needed one for above is:
Crossreading it a bit seems to indicate that this is not like the above needed language feature.
WASM ... on gentoo ...
Right now rust is not really a first class citizen within the gentoo eco
system. For that reason at least when compiling rust with the system-llvm
use flag some manual preparations are needed.
rustwasm tutorial
location of rustlib ...
wasm-pack
expects the wasm runtime under /usr/lib/rustlib/ but a gentoo
installation puts it under /usr/lib/rust-1.39.0/rustlib/. To come around this
issue I just created a symlink.
Missing lld
Again wasm-pack
searches for llvm-lld or rust-lld for the link phase. This
is currently not a dependency for llvm with WASM support, so I installed it
manually. Finally you have to tell rustc to use lld as linker via this
environment variable:
export RUSTFLAGS="-C linker=lld"