Hey, I’ve played with this before. Here’s how I handled it:
- In code, from rust to rust. You can create a struct however you’d like, and pass it in install_code, like so: quickstart_scaling/businesslogic.rs at 3c9a65ee19c0fa458d4ddc8582c76d7bd6dbdbdf · GLicDEV/quickstart_scaling · GitHub
On the receiving side, you get it like so: quickstart_scaling/lifetime.rs at 3c9a65ee19c0fa458d4ddc8582c76d7bd6dbdbdf · GLicDEV/quickstart_scaling · GitHub
- For compatibility with dfx, and for automatic did generation, you can append your init function with the proper macro, as described here: How to pass install arguments from dfx?
Hope this helps