Examples showing more integration with Rust programs?
Hello! Sorry that this is more of a question than a bug report, I followed the Discord link and wound up in an indie game collective server without a piccolo channel, and came back here rather than disturb them.
I'm trying to evaluate piccolo as a scripting runtime, and I've been reading the code and rustdoc, and am stuck at more or less the first stage: getting an idea of how this will look driving an existing API. Concretely,
- If I need to give Lua a handle to some existing type, how would I do that? Does that involve
UserData? I notice thatstashalso says it can work with any Rust type that implementsStashable, butStashablehas no docs. Theuserdata.rstest I think may be demonstrating this, but it's only working with internal types and I can't tell how general it is. - What's the best code to read to understand how wrapping an existing Rust API works? Ideally a non-
asyncAPI.
If there's a piccolo user whose code I should be reading instead, I'm happy to do so -- I looked at dependent crates on crates.io and wasn't sure which were authoritative (many lack readmes, which is obviously not your fault!).
If you're open to it, I'd be happy to contribute some additional rustdoc as I figure out the system. I usually try to figure out new crates from the rustdoc, but most of piccolo's types are currently undocumented, so that approach didn't work.
And of course if there's a better place for me to ask these questions, I'm all ears.
Thanks!