Browse Source

Docs and links

master
Georg Hopp 6 years ago
parent
commit
390709b024
Signed by: ghopp GPG Key ID: 4C5D226768784538
  1. 53
      interesting.md

53
interesting.md

@ -0,0 +1,53 @@
# 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](https://varkor.github.io/blog/2019/03/28/idiomatic-monads-in-rust.html)
### Is impl Trait what we needed?
A new language feature which sounded a bit like the needed one for above is:
[impl Trait](https://medium.com/@iopguy/impl-trait-in-rust-explanation-efde0d94946a)
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
[rustwasm](https://rustwasm.github.io/book/introduction.html)
### 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"
Loading…
Cancel
Save