Rust, WASM-bindgen, petgraph, working together

I am very new to Rust, so apologies in advance if this is a rookie question.
I am trying to use Rust for a webapp, specifally to hold the tree structure in the memory of Rust instead of the heap of the Javascript.

Full detaiil of what I have tried and my code is here

TL:DR - basically I followed https://rustwasm.github.io/docs/book/introduction.html and try to use petgraph crate with it, but when creating the struct with Graph, its asking for 2 parameters, I have tried other syntax to put the parameters in but it looks like wasm-bindgen does not support it.

Please any help is appreciated thanks.

Did you find the answer on SO?

Yes this is replied but the solution is in stackoverflow not sure how to close it here?
Also if I have another question on the same project could I ask it here or should I start a new thread?
Let me know and thanks for the help.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.