Update the code generation logic to support other item types in addition to functions. Currently only functions are fully supported for #[cs_bindgen], but there is stubbed-out support for structs in place that will be fleshed out more in a subsequent PR.
In addition, I've added better error handling support in cs-bindgen-cli. It will now gracefully handle any issues while loading the declarations from the wasm module and print a more descriptive error message instead of panicking. I've opted to use the snafu crate for error handling, since it seemed like the most straightforward option that I could find in five minutes.
Update the code generation logic to support other item types in addition to functions. Currently only functions are fully supported for
#[cs_bindgen]
, but there is stubbed-out support for structs in place that will be fleshed out more in a subsequent PR.In addition, I've added better error handling support in
cs-bindgen-cli
. It will now gracefully handle any issues while loading the declarations from the wasm module and print a more descriptive error message instead of panicking. I've opted to use the snafu crate for error handling, since it seemed like the most straightforward option that I could find in five minutes.