Skip to content

ocaml::Map? #137

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Pat-Lafon opened this issue Jun 15, 2023 · 2 comments
Open

ocaml::Map? #137

Pat-Lafon opened this issue Jun 15, 2023 · 2 comments

Comments

@Pat-Lafon
Copy link
Contributor

I was looking at different values for constructing my interface between Ocaml and Rust. Is there a way to easily translate an Ocaml map to Rust? Maybe I'm wrong but I think the standard Ocaml Map is used often enough to warrant an interface struct like https://docs.rs/ocaml/latest/ocaml/struct.List.html to help with the conversion.

Otherwise I guess I will be converting to an associated list which isn't bad, but unsatisfying compared to having an ocaml::Map which could be converted to HashMap and back.

@zshipko
Copy link
Owner

zshipko commented Jun 17, 2023

Thay could be a nice addition - I am not familiar with how Map is implemented, but if it could be implemented on the Rust side without any callbacks into stdlib then I think it would be a good candidate!

@Pat-Lafon
Copy link
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants