Skip to content

Commit cd31edf

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

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

README.md

+22
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,28 @@ A high-performance API for building Shopify Functions using WebAssembly (WASM).
66

77
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.
88

9+
## Architecture
10+
11+
The WASM API consists of these main components:
12+
13+
1. **Core (`core/`)**
14+
- Low-level WASM bindings and memory management
15+
- Handles raw memory operations and string handling
16+
- Provides the foundation for the API layer
17+
- Manages direct WASM imports/exports
18+
19+
2. **API (`api/`)**
20+
- High-level interface for writing Shopify Functions
21+
- Provides the `#[shopify_function]` macro
22+
- Handles input/output operations with a user-friendly API
23+
- Built on top of the core package
24+
25+
3. **Trampoline (`trampoline/`)**
26+
- Bridges communication between your WASM module and Shopify's runtime
27+
- Handles memory sharing between guest and provider modules
28+
- Manages string operations and object property access
29+
- Creates the necessary WASM imports/exports
30+
931
## Getting Started
1032

1133
### Prerequisites

0 commit comments

Comments
 (0)