Skip to content

Commit fc155db

Browse files
committed
docs(runtime): update example and doc links
1 parent 19aec4d commit fc155db

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

packages/globe_runtime/README.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -489,6 +489,8 @@ The **recommended way** to create Globe Runtime SDKs is using the `@globe/dart_s
489489
- **Seamless Dart integration** with generated wrapper classes
490490
- **Hot reload support** in watch mode during development
491491

492+
### Example
493+
492494
#### Step 1: Set up your TypeScript SDK
493495

494496
Create a new directory for your SDK and initialize it:
@@ -502,7 +504,8 @@ npm install @globe/runtime_types @globe/dart_source_generator -D
502504

503505
#### Step 2: Define your SDK in TypeScript
504506

505-
Create `src/sdk.ts`:
507+
Create `src/sdk.ts`.
508+
Note: You can create multiple SDKs in the same project but not in the same file.
506509

507510
```typescript
508511
import { defineSdk, returnString, streamString } from "@globe/runtime_types";
@@ -602,7 +605,7 @@ void main() async {
602605
}
603606
```
604607

605-
### Project structure
608+
#### Final Project structure
606609

607610
```
608611
my_sdk/
@@ -615,9 +618,9 @@ my_sdk/
615618
├── package.json
616619
```
617620
618-
The `@globe/dart_source_generator` automatically generates the SDK wrapper class with type-safe methods that handle all the Dart FFI interop boilerplate. You simply call methods and get properly typed `Future` or `Stream` objects back.
621+
The `@globe/dart_source_generator` automatically generates the SDK wrapper class with type-safe methods that handle all the Dart FFI interop boilerplate. You simply call methods, with type-safe parameters, and get properly typed `Future` or `Stream` objects back.
619622
620-
For more details, see the [@globe/dart_source_generator documentation](https://www.npmjs.com/package/@globe/dart_source_generator) and [@globe/runtime_types documentation](https://www.npmjs.com/package/@globe/runtime_types).
623+
For more details, see the [@globe/dart_source_generator documentation](https://github.com/invertase/globe_runtime/tree/main/packages/globe_runtime_ts/dart_source_generator/README.md) and [@globe/runtime_types documentation](https://github.com/invertase/globe_runtime/tree/main/packages/globe_runtime_ts/runtime_types/README.md).
621624
622625
---
623626

0 commit comments

Comments
 (0)