Skip to content
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

Perfect conversions from JsValue -> arbitrary Rust types -> JsValue #142

Closed
1 task done
lastmjs opened this issue Mar 29, 2022 · 5 comments
Closed
1 task done

Perfect conversions from JsValue -> arbitrary Rust types -> JsValue #142

lastmjs opened this issue Mar 29, 2022 · 5 comments
Assignees

Comments

@lastmjs
Copy link
Member

lastmjs commented Mar 29, 2022

It's becoming apparent that Azle really needs to be able to convert to and from JsValue's generally. I think this is the root of my serde Serialize problems with Candid Nat, and is one of the major issues I am waiting on in boa and to get cross-canister calls to work.

Perhaps I should start by just implementing the conversions myself, if it goes well I can integrate them into boa and do a pull request to hopefully have it upstreamed.

Implement this first:

@lastmjs lastmjs self-assigned this Mar 29, 2022
@lastmjs
Copy link
Member Author

lastmjs commented Mar 29, 2022

I might want to go ahead and just implement a fix for this issue: boa-dev/boa#1975

@lastmjs
Copy link
Member Author

lastmjs commented Mar 30, 2022

I'm trying to figure out the proper way to convert a Rust type into a JsValue in boa, I think it's to use .into() or JsValue::from

@lastmjs
Copy link
Member Author

lastmjs commented Mar 30, 2022

Follow this conversation: boa-dev/boa#1971 (comment)

@lastmjs
Copy link
Member Author

lastmjs commented Mar 30, 2022

Once this is approved boa-dev/boa#1989 make sure to pull request the rest of the integer conversions to JsValue

@lastmjs lastmjs closed this as completed Apr 1, 2022
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

1 participant