heathdbrown / research

Things to look at it or that interest me.
0 stars 0 forks source link

Rust and WASM #58

Open heathdbrown opened 1 year ago

heathdbrown commented 1 year ago

Rust and WASM

Rust the language natively can compile target down to web assembly (?).

https://rustwasm.github.io/docs/book/game-of-life/introduction.html

heathdbrown commented 1 year ago
  ', /home/heath/.cargo/registry/src/github.com-1ecc6299db9ec823/openssl-sys-0.9.84/build/find_normal.rs:190:5
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: failed to compile `cargo-generate v0.18.1`, intermediate artifacts can be found at `/tmp/cargo-installW5IAcz`
heath@laptop:~/projects$ ls

Solved by installing on Ubuntu:

heathdbrown commented 1 year ago

https://github.com/rust-lang/rustlings -- Kata for Rust https://rust-book.cs.brown.edu/ -- book of rust https://doc.rust-lang.org/rust-by-example/

https://fasterthanli.me/articles/a-half-hour-to-learn-rust

https://www.youtube.com/watch?v=2hXNd6x9sZs&list=TLPQMTAwNDIwMjO1N-egbI6xvA&index=5

heathdbrown commented 1 year ago

Watch out for lifetime annotations.

To get around these for the beginner:

1.) dont' use references 2.) copy and clone everything 3.) obey the compiler