polywrap / documentation

8 stars 14 forks source link

Documentation: "Concepts" entries providing high-level overviews #321

Open krisbitney opened 11 months ago

krisbitney commented 11 months ago

In a recent paid user study, the user felt like Polywrap was a black box. He was an experienced Wasm user but didn't understand what Polywrap was doing under the hood. Software engineers like to have a mental model of what's happening so they can reason about it. For example, a React developer may want to understand how and when components are rendered.

Our documentation should include a high-level overview, with visual diagrams, that explains topics like:

What happens during a wrap invocation

  1. User calls invoke
  2. Arguments are serialized in the host language and sent to the wrap
  3. Arguments are deserialized into static types within the wrap (e.g. in Rust)
  4. method is invoked
  5. return value is serialized within wrap
  6. return value is deserialized in the client and returned to the user
  7. etc.

What happens during a wrap subinvocation--how does it work?

What happens in the build process? Why do we prefer building with docker?

How do wrap interfaces work and why are the useful?

What happens during URI resolution? How is this similar/different to package managers like NPM?