Skip to content

Commit 8674184

Browse files
committed
add section on archetcture
1 parent 087f044 commit 8674184

File tree

1 file changed

+21
-2
lines changed

1 file changed

+21
-2
lines changed

README.md

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,28 @@
22

33
A high-performance API for building Shopify Functions using WebAssembly (WASM).
44

5-
## Overview
65

7-
The Shopify Function WASM API provides a streamlined interface for developing high-performance Shopify Functions. It uses WebAssembly to offer improved execution speed, reduced memory usage, and enhanced security compared to traditional functions.
6+
## Architecture
7+
8+
The WASM API consists of these main components:
9+
10+
1. **Core (`core/`)**
11+
- Low-level WASM bindings and memory management
12+
- Handles raw memory operations and string handling
13+
- Provides the foundation for the API layer
14+
- Manages direct WASM imports/exports
15+
16+
2. **API (`api/`)**
17+
- High-level interface for writing Shopify Functions
18+
- Provides the `#[shopify_function]` macro
19+
- Handles input/output operations with a user-friendly API
20+
- Built on top of the core package
21+
22+
3. **Trampoline (`trampoline/`)**
23+
- Bridges communication between your WASM module and Shopify's runtime
24+
- Handles memory sharing between guest and provider modules
25+
- Manages string operations and object property access
26+
- Creates the necessary WASM imports/exports
827

928
## Getting Started
1029

0 commit comments

Comments
 (0)