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

Add initial version of revised "What is polywrap" section #319

Merged
merged 4 commits into from
Oct 31, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
const sidebars = {
docs: [
'introduction',
`faq`,
{
type: 'category',
label: 'Quick Start',
Expand Down
68 changes: 68 additions & 0 deletions src/docs/faq.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
---
id: faq
title: FAQ
---

## What is Polywrap?

Polywrap is a framework for porable and composable SDKs. Polywrap calls these SDKs “wraps”. Wraps are essentially WebAssembly-based modules.
dOrgJelli marked this conversation as resolved.
Show resolved Hide resolved

## What are wraps?

Wraps are simply WebAssembly binaries built with Polywrap and packaged with specific metadata that allows clients to run them.

## How are wraps run?

Wraps are run by clients. Clients will fetch a wrap and execute it locally in the context of the application. Clients exist in a variety of languages: JavaScript, Rust, Python, etc.

## How does this execution happen?

In a nutshell, wrap execution follows these steps:

- The application requests the execution of a wrap
- Internally, the client:
- Fetches the requested wrap
- Executes the wrap's function inside a WebAssembly runtime
- The client returns the result of the wrap's function call back to the application

## Where do wraps come from?

Wraps can be bundled with the application, or loaded from external sources: file storage, the Internet, you name it. Clients allows developers to configure this.

## Who/what can use wraps?

Wraps are used within apps and other wraps. They are defined via their metadata, which allows apps to integrate wraps, and wraps to import other wraps.

## Why wraps?

- Wraps can run and live anywhere:
- Clients exist in [many languages](/clients).
- Wraps can be bundled with apps or downloaded when needed.
- Wraps can call other wraps:
- Wrap metadata is imported at built-time.
- Wrap code is executed at run-time.
- Wraps help secure your app:
- They execute in a secure WebAssembly environment.
- They don't have direct access to their host environment.

## How do I access host capabilities?

Wraps can import host functions defined by the application developer. These native functions allow wraps to access host capabilities. Polywrap packages these capabilities as “plugins”.
dOrgJelli marked this conversation as resolved.
Show resolved Hide resolved

## Can I write my own plugins?

Yes, you can write any host capabilities you need as plugins in your application’s language. Polywrap also provides a set of basic plugins out-of-the-box:

- Filesystem
- HTTP/S
- Ethereum wallet connection
- Logging

## How should I get started?

To execute your first wrap, follow one of our Quick Start guides:
- [Javascript/Typescript](/quick-start/javascript)
- [Rust](/quick-start/rust)
- [Python](/quick-start/python)
- [Kotlin](/quick-start/kotlin)
- [Swift](/quick-start/swift)
2 changes: 1 addition & 1 deletion src/docs/quick-start/javascript.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ title: 'Javascript'

## The Polywrap Client

To use [Wraps](/concepts/wraps) in your app, all you need is the [Polywrap Client](/clients)!
To use [Wraps](/concepts/wraps) in your app, all you need is the [Polywrap Client](/clients).

### NodeJS application boilerplate

Expand Down
2 changes: 1 addition & 1 deletion src/docs/quick-start/kotlin.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ title: 'Kotlin'

## The Polywrap Client

To use [Wraps](/concepts/wraps) in your app, all you need is the [Polywrap Client](/clients)!
To use [Wraps](/concepts/wraps) in your app, all you need is the [Polywrap Client](/clients).

### Kotlin application boilerplate

Expand Down
2 changes: 1 addition & 1 deletion src/docs/quick-start/python.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ title: 'Python'

## The Polywrap Client

To use [Wraps](/concepts/wraps) in your app, all you need is the [Polywrap Client](/clients)!
To use [Wraps](/concepts/wraps) in your app, all you need is the [Polywrap Client](/clients).

### NodeJS application boilerplate

Expand Down
2 changes: 1 addition & 1 deletion src/docs/quick-start/rust.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ title: 'Rust'

## The Polywrap Client

To use [Wraps](/concepts/wraps) in your app, all you need is the [Polywrap Client](/clients)!
To use [Wraps](/concepts/wraps) in your app, all you need is the [Polywrap Client](/clients).

### Rust application boilerplate

Expand Down
2 changes: 1 addition & 1 deletion src/docs/quick-start/swift.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ title: 'Swift'

## The Polywrap Client

To use [Wraps](/concepts/wraps) in your app, all you need is the [Polywrap Client](/clients)!
To use [Wraps](/concepts/wraps) in your app, all you need is the [Polywrap Client](/clients).

### Swift Project setup

Expand Down
Loading