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

How to add more types / plans going forward #46

Open
torch2424 opened this issue Oct 7, 2020 · 0 comments
Open

How to add more types / plans going forward #46

torch2424 opened this issue Oct 7, 2020 · 0 comments
Assignees
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers

Comments

@torch2424
Copy link
Owner

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!

@torch2424 torch2424 added documentation Improvements or additions to documentation good first issue Good for newcomers labels Oct 7, 2020
@torch2424 torch2424 self-assigned this Oct 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant