Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
kouteiheika
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
73 ms
·
661.
▲
by
kouteiheika
8y ago
A tip - you usually don't need lambdas in such cases; this should work: foo().map_err(MyError::FooError)? .bar().map_err(MyError::BarError)?;
662.
▲
by
kouteiheika
8y ago
If it's something that doesn't take too much wall time I just simply initialize those from scratch for every test. If I have multiple tests which need some complex setup I just put that down in a separate function and call that in
663.
▲
by
kouteiheika
8y ago
> Rust comes with a default unit test framework but it pretty bare bones. I havent seen examples of test fixture, setup/teardown support and loading test configs etc. This is one of the things that I really love about Rust - it has
664.
▲
by
kouteiheika
9y ago
Compiling Rust to WebAssembly and building https://github.com/koute/stdweb Rust is a powerful enough language where you can do crazy stuff like write inline JavaScript inside of your Rust code , and freely pass data
665.
▲
An NES emulator ported to WebAssembly using LLVM and Rust's native WASM support
(koute.github.io)
1 points
by
kouteiheika
9y ago
|
0 comments
666.
▲
Access the DOM and Call into JavaScript from Rust Compiled to WebAssembly
(github.com)
3 points
by
kouteiheika
9y ago
|
0 comments
667.
▲
by
kouteiheika
10y ago
> I read that Rust for example only has run-time checks in the debug version, which to me is disappointing. Only by default; you can turn them on in release builds too if you want. (And Rust 1.17 will have a stable `-C overflow-checks=y`
668.
▲
by
kouteiheika
10y ago
Fortunately for Rust that's not an issue since you don't need any special privileges to install it; hell, it doesn't even have to be installed. As long as you point your $PATH to Rust's bin directory you can use it, as f