Stream: general

Topic: Confused about the use of store in Python WITX bindings


view this post on Zulip Kevin Smith (Sep 29 2021 at 18:17):

I'm just starting to play around with the Python WITX bindings from witx-bindgen. I noticed that the methods generated on the module class all require a store to be passed in, but isn't the store paired with the instance created in the constructor? I'm curious as to what the intent is with this separation.

view this post on Zulip Alex Crichton (Sep 29 2021 at 18:40):

There's some more information about the API design here -- https://github.com/bytecodealliance/rfcs/blob/main/accepted/new-api.md -- but the general gist is that the store is a "uniquely owned" object and an Instance is effectively just an index of an object within a store, so it doesn't mean anything outside of the store

RFC process for Bytecode Alliance projects. Contribute to bytecodealliance/rfcs development by creating an account on GitHub.

Last updated: Oct 23 2024 at 20:03 UTC