Skip to content

Make WASM Arrays More Consistent Throughout Web Client #1192

@dagarcia7

Description

@dagarcia7

There are some cases in the web client where there is a special Array type for a certain WASM object. For example, FeltArray here

. This would be fine except that sometimes the inputs to some WASM functions accept a FeltArray and other times a Vec<Felt> is accepted instead.

The original intent behind these custom Array objects was that I didn't want users stressing out over ownership issues in rust when they would call into it via WASM code. For example, if you called a function that passed in a Vec<Felt> and in JS you constructed a Felt[] and passed it in, then that array would be unusable later on within the scope of that same function code.

In any case, we should revisit these custom types and either make more to make things consistent, or remove them altogether. But the mix of the two right now is causing some confusion amongst builders.

Metadata

Metadata

Assignees

Labels

web clientRelated to the Web Client

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions