xous-core/xous-rs
bunnie 0e936eaee3 add a macro to help reduce the burden of unpacking messages
The syntax to pattern-match a message is a pretty heavy cognitive
burden. Try to ease that by introducing a macro.

The main coin-toss here is whether to include the "what you do
with the message" expression within the macro, or to allow it to
be a block that trails it.

The main benefit of including the body inside the macro is that
we can append an "else" clause that spits out an error message
in case the template didn't match. The drawback is the awkwardness
of putting curly braces inside the parens of the macro expansion.

I think Rust coders are probably more OK with that awkwardness,
even though I find it visually unappealing; and the benefit is that
scalars sent to opcodes expecting blockingscalars (and vice versa)
don't go to a "black hole" -- you'll get an error message.

This error message will probably save someone an hour of debugging
someday, so we'll go with the awkwardness.
2021-04-02 15:34:39 +08:00
..
bin initial commit 2020-03-10 12:13:05 +08:00
src add a macro to help reduce the burden of unpacking messages 2021-04-02 15:34:39 +08:00
assemble.ps1 initial commit 2020-03-10 12:13:05 +08:00
assemble.sh initial commit 2020-03-10 12:13:05 +08:00
build.rs repo: run cargo fmt 2021-01-03 18:31:51 +08:00
Cargo.toml ipc: convert project to use xous-ipc 2021-03-26 20:22:33 +08:00