Skip to content

Commit 74843e2

Browse files
committed
Merge branch 'getting-started-updates' into 'develop'
Update stale "Getting Started" sections in README See merge request polycentric/polycentric!527
2 parents d6ce49d + dfc4012 commit 74843e2

3 files changed

Lines changed: 40 additions & 16 deletions

File tree

README.md

Lines changed: 33 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,39 @@
1515

1616
> :warning: **We're working on this.**
1717
18-
You will need [just](https://github.com/casey/just), Docker, and pnpm.
18+
You will need:
1919

20-
1. **Build rs-core for all platforms:** `just packages/rs-core/build-all`
21-
2. **Install dependencies:** `pnpm install`
22-
3. **Run the app:** `pnpm:run web`, `pnpm run:ios`, or `pnpm run:android`
20+
- [Node.js](https://nodejs.org), version pinned in `.nvmrc`
21+
- [pnpm](https://pnpm.io)
22+
- [Rust toolchain](https://rustup.rs)
23+
- [`protoc`](https://github.com/protocolbuffers/protobuf)
24+
- [`docker compose`](https://github.com/docker/compose)
2325

24-
## Development
26+
The following commands will get you up and running:
27+
```sh
28+
# Use node version manager to install the pinned version of node
29+
nvm install
2530

26-
- `pnpm dev` builds all SDKs in watch mode.
31+
# Add the WASM target to the rust toolchain
32+
rustup target add wasm32-unknown-unknown
33+
34+
# Build the frontend and core binaries
35+
pnpm install
36+
pnpm build
37+
38+
# Start the server process
39+
docker compose up -d --build
40+
41+
# Apply the database schema if it has changed
42+
docker compose run --rm server /app/migration fresh
43+
44+
# Start the frontend dev server
45+
pnpm dev
46+
```
47+
48+
If you're using Podman, ensure `docker compose` resolves to Compose v2.
49+
50+
To run the server from source instead, see [`services/server/README.md`](services/server/README.md).
2751

2852
## Project Structure
2953

@@ -34,10 +58,11 @@ You will need [just](https://github.com/casey/just), Docker, and pnpm.
3458
| `packages/js-core` | Core JavaScript library containing the main Polycentric protocol logic |
3559
| `packages/js-browser` | Browser SDK using SQLite WASM for local storage |
3660
| `packages/js-node` | Node.js SDK using sqlite3 for local storage |
61+
| `packages/js-storage-sqlite` | Shared SQLite (Drizzle ORM) storage layer for the JS SDKs |
3762
| `packages/react-native` | React Native SDK for mobile applications |
63+
| `packages/rs-common` | Shared Rust code used by rs-core |
3864
| `packages/rs-core` | Rust core library - the underlying protocol implementation |
39-
| `packages/rs-core-wasm-browser` | Rust core compiled to WebAssembly for browser environments |
40-
| `packages/rs-core-wasm-node` | Rust core compiled to WebAssembly for Node.js environments |
65+
| `packages/rs-core-uniffi-web` | rs-core on WASM with `uniffi-bindgen-react-native` bindings |
4166

4267
### Apps
4368

compose.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ services:
4141
ports:
4242
- 9000:9000
4343
- 9001:9001
44+
environment:
45+
# rustfs:latest refuses the default root credentials on a non-loopback listener. This
46+
# re-enables them so that default credentials continue to work for all dependent services.
47+
- RUSTFS_ALLOW_INSECURE_DEFAULT_CREDENTIALS=true
4448
healthcheck:
4549
test: ['CMD', 'curl', '-sf', 'http://localhost:9000/health']
4650
interval: 10s

packages/rs-core/README.md

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
# Polycentric Core Rs
22

3-
Rust core library for the Polycentric protocol. Compiles to static libraries (FFI) for iOS/Android and to WASM for web/node.
3+
Rust core library for the Polycentric protocol. Compiled to native FFI bindings (iOS/Android) and WASM (web) via uniffi-bindgen-react-native (`ubrn`).
44

5-
From this directory, use the justfile for builds, tests, and tooling:
6-
7-
- `just build-all` — FFI (iOS sim + Android) + WASM for web and node; deploys into react-native
8-
- `just build-all-device` — same but iOS device (not sim)
9-
- `just build-ffi-ios-sim`, `just build-ffi-android-all`, `just build-wasm-all` — individual targets
10-
- `just test`, `just check`, `just format`, `just clippy`, `just doc` — cargo workflows
11-
- `just` — list all recipes
5+
Builds are usually driven from the root `pnpm` workspace, but `cargo` or `just` can be used in this
6+
directory to run workflows specific to `just`. Use `just` in the terminal to list the recipes.

0 commit comments

Comments
 (0)