interesting.md 2.96 KB

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.»

Read here

Is impl Trait what we needed?

A new language feature which sounded a bit like the needed one for above is:

impl Trait

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.

general informations about Wasm from MDN ...

WebAssembly

rustwasm tutorial

rustwasm

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.

Maybe it would be best to send a patch for also settings this symlink to upstream eselect-rust.

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"

Traits when, how & why

A slightly old but still worthwhile post about rusts standard traits.

About traits

Side note... 3d math

3d math primer basic 3d math vector calculator 3d vector mathematics sin appr. with fractions

transformations within a coordinate system.

migenius tutorialspoint

more math...

A whole lot of interesting stuff about continued fractions: continues fractions