Skip to content

How to add more types / plans going forward #46

Open
@torch2424

Description

@torch2424

Was chatting in the AS discord about AS bind, and figured this would be good to document in an issue as well 😄


  1. Identify the data id in: https://github.com/torch2424/as-bind/blob/master/lib/assembly/as-bind.ts#L15
  2. Pull the data out of linear memory by it's layout: https://www.assemblyscript.org/interoperability.html#class-layout or https://www.assemblyscript.org/memory.html#internals

I do think that library would be helpful for general Data management in a JS app, and could allow for a "Everything is a data view", making things similar on the implementation side. But I wouldn't want to force users into using a specific library, or inflate the code size (It's not super big at 11kb, but currently we sit around 4kb + tree-shakable): https://bundlephobia.com/[email protected]
What we probably want to do, per the steps I mentioned above, is expose the Standard Library automatically in the as-bind entry file.

And for custom objects, is offer a way in both JS and AS land to pass around custom objects using like a function call.

That also being said, I know per the working meeting, there's plans to build an AS bindgen soon-ish. Which would then be the preffered way to handle this. :slight_smile: But I don't know how soon is soon haha!

Metadata

Metadata

Assignees

Labels

documentationImprovements or additions to documentationgood first issueGood for newcomers

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions