u/Michael-F-Bryan
-
18points
-
73points
-
1points
Obsidian Tricks: Daily Notes (adventures.michaelfbryan.com)
-
15points
Obsidian Tricks: Daily Notes (adventures.michaelfbryan.com) [Method]
-
1points
Obsidian Tricks: Daily Notes (adventures.michaelfbryan.com)
-
1points
Obsidian Tricks: Entity Notes (adventures.michaelfbryan.com)
-
9points
Obsidian Tricks: Entity Notes (adventures.michaelfbryan.com) [Discussion]
-
1points
Obsidian Tricks: Entity Notes (adventures.michaelfbryan.com)
-
8points
Obsidian Tricks: The Summary Callout (adventures.michaelfbryan.com) [Method]
-
0points
Obsidian Tricks: The Summary Callout (adventures.michaelfbryan.com)
-
6points
Reboot Friendly Projects - Building Systems That Let You Disappear (and Come Back) (adventures.michaelfbryan.com)
-
196points
Announcing WASIX - the Superset of WASI (wasmer.io)
-
43points
Build Universal Libraries with Rust (youtube.com)
- 31points
-
9points
-
7points
-
38points
Announcing Wasmer 3.0 (wasmer.io)
-
158points
Announcing Wasmer 3.0 (wasmer.io)
-
142points
Announcing Wasmer 3.0 (wasmer.io)
Michael-F-Bryan
Michael-F-Bryan
Yep. The function for loading a library accepts several options, one of which is a pre-compiled WebAssembly module (changelog).
Michael-F-Bryan
I'd implement the Add trait for both values and references.
The String type does this so String::from("Hello ") + "World" will return the first string with "World" appended to it.
Michael-F-Bryan
You sure can.
There are JavaScript libraries like @wasmer/wasi which provide things like stdin/stdout/stderr, environment variables, a filesystem abstraction, and so on.
That means you could compile a Rust executable to wasm32-wasi and start it using something like this.
Michael-F-Bryan
That's not how cargo works. Cargo just passes the entry point (e.g. lib.rs) to rustc, and rustc will load files from disk when it encounters a mod statement during the parsing stage. Because things like macros and conditional compilation can change which source files are used, the only way to find all the inputs is by implementing a full compiler front-end (i.e. rustc or rust-analyzer), whereas cargo is just a build tool and package manager.
The crate hash is also determined by rustc, and is calculated based on the crate name and all -C arguments. You'll probably want to read the rustc dev guide to get a better understanding of how the compiler works
You can also see the full command sent to rustc by running cargo build --verbose.
Michael-F-Bryan
Please, no. Requiring @ for all bindings would make using match a lot more verbose for something you'll only run into once as a beginner.
Besides, the compiler already emits a "the _ branch is unreachable" warning for this code and I believe clipy has a lint for exactly this situation.
By using a callout, you visually separate the TL;DR from the rest of the note's content.
In practice I've never needed to embed a summary of a particular thing into another note - I'll just link to the note instead. That way my flow won't be broken if I'm reading through a note and I can always click the link if I want to find out more.