Skip to content
This repository was archived by the owner on Aug 8, 2025. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion docs/how-to/incremental-migrations.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ $ spacetime sql incr-migration-demo 'SELECT * FROM character'
<snip> | "Gefjon" | 2 | (Fighter = ())
```

See [the SATS JSON reference](/docs/sats-json) for more on the encoding of arguments to `spacetime call`.
See [the SATS JSON reference](/docs/internals/sats-json) for more on the encoding of arguments to `spacetime call`.

Now we want to add a new feature: each player should be able to align themselves with the forces of good or evil, so we can get some healthy competition going between our players. We'll start each character off with `Alliance::Neutral`, and then offer them a reducer `choose_alliance` to set it to either `Alliance::Good` or `Alliance::Evil`. Our first attempt will be to add a new column to the type `Character`:

Expand Down
8 changes: 4 additions & 4 deletions docs/http/database.md
Original file line number Diff line number Diff line change
Expand Up @@ -224,10 +224,10 @@ For more information about WebSocket headers, see [RFC 6455](https://datatracker
| `Sec-WebSocket-Version` | `13` |
| `Sec-WebSocket-Key` | A 16-byte value, generated randomly by the client, encoded as Base64. |

The SpacetimeDB binary WebSocket protocol, `v1.bsatn.spacetimedb`, encodes messages as well as reducer and row data using [BSATN](/docs/bsatn).
The SpacetimeDB binary WebSocket protocol, `v1.bsatn.spacetimedb`, encodes messages as well as reducer and row data using [BSATN](/docs/internals/bsatn).
Its messages are defined [here](https://github.com/clockworklabs/SpacetimeDB/blob/master/crates/client-api-messages/src/websocket.rs).

The SpacetimeDB text WebSocket protocol, `v1.json.spacetimedb`, encodes messages according to the [SATS-JSON format](/docs/sats-json).
The SpacetimeDB text WebSocket protocol, `v1.json.spacetimedb`, encodes messages according to the [SATS-JSON format](/docs/internals/sats-json).

#### Optional Headers

Expand Down Expand Up @@ -442,6 +442,6 @@ Returns a JSON array of statement results, each of which takes the form:
}
```

The `schema` will be a [JSON-encoded `ProductType`](/docs/sats-json) describing the type of the returned rows.
The `schema` will be a [JSON-encoded `ProductType`](/docs/internals/sats-json) describing the type of the returned rows.

The `rows` will be an array of [JSON-encoded `ProductValue`s](/docs/sats-json), each of which conforms to the `schema`.
The `rows` will be an array of [JSON-encoded `ProductValue`s](/docs/internals/sats-json), each of which conforms to the `schema`.
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ A database exports [tables](#table), which store data, and [reducers](#reducer),

A database's schema and business logic is specified by a piece of software called a **module**. Modules can be written in C# or Rust.

(Technically, a SpacetimeDB module is a [WebAssembly module](https://developer.mozilla.org/en-US/docs/WebAssembly) that imports a specific low-level [WebAssembly ABI](/docs/webassembly-abi) and exports a small number of special functions. However, the SpacetimeDB [server-side libraries](#module-libraries) hide these low-level details. As a developer, writing a module is mostly like writing any other C# or Rust application, except for the fact that a [special CLI tool](/install) is used to deploy the application.)
(Technically, a SpacetimeDB module is a [WebAssembly module](https://developer.mozilla.org/en-US/docs/WebAssembly) that imports a specific low-level [WebAssembly ABI](/docs/internals/webassembly-abi) and exports a small number of special functions. However, the SpacetimeDB [server-side libraries](#module-libraries) hide these low-level details. As a developer, writing a module is mostly like writing any other C# or Rust application, except for the fact that a [special CLI tool](/install) is used to deploy the application.)

### Table
A SpacetimeDB **table** is a SQL database table. Tables are declared in a module's native language. For instance, in C#, a table is declared like so:
Expand Down
2 changes: 1 addition & 1 deletion docs/bsatn.md → docs/internals/bsatn.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,6 @@ Where
All SATS types are BSATN-encoded by converting them to an `AlgebraicValue`,
then BSATN-encoding that meta-value.

See [the SATN JSON Format](/docs/sats-json)
See [the SATN JSON Format](/docs/internals/sats-json)
for more details of the conversion to meta values.
Note that these meta values are converted to BSATN and _not JSON_.
File renamed without changes.
2 changes: 1 addition & 1 deletion docs/modules/c-sharp/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ You can also generate code for clients of your module using the `spacetime gener

# How it works

Under the hood, SpacetimeDB modules are WebAssembly modules that import a [specific WebAssembly ABI](https://spacetimedb.com/docs/webassembly-abi) and export a small number of special functions. This is automatically configured when you add the `SpacetimeDB.Runtime` package as a dependency of your application.
Under the hood, SpacetimeDB modules are WebAssembly modules that import a [specific WebAssembly ABI](https://spacetimedb.com/docs/internals/webassembly-abi) and export a small number of special functions. This is automatically configured when you add the `SpacetimeDB.Runtime` package as a dependency of your application.

The SpacetimeDB host is an application that hosts SpacetimeDB databases. [Its source code is available](https://github.com/clockworklabs/SpacetimeDB) under [the Business Source License with an Additional Use Grant](https://github.com/clockworklabs/SpacetimeDB/blob/master/LICENSE.txt). You can run your own host, or you can upload your module to the public SpacetimeDB network. <!-- TODO: want a link to some dashboard for the public network. --> The network will create a database for you and install your module in it to serve client requests.

Expand Down
6 changes: 3 additions & 3 deletions docs/nav.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ const nav = {
page('`/identity`', 'http/identity', 'http/identity.md'),
page('`/database`', 'http/database', 'http/database.md'),
section('Internals'),
page('Module ABI Reference', 'webassembly-abi', 'webassembly-abi/index.md'),
page('SATS-JSON Data Format', 'sats-json', 'sats-json.md'),
page('BSATN Data Format', 'bsatn', 'bsatn.md'),
page('Module ABI Reference', 'webassembly-abi', 'internals/webassembly-abi.md'),
page('SATS-JSON Data Format', 'sats-json', 'internals/sats-json.md'),
page('BSATN Data Format', 'bsatn', 'internals/bsatn.md'),
section('Appendix'),
page('Appendix', 'appendix', 'appendix.md'),
],
Expand Down
6 changes: 3 additions & 3 deletions nav.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,9 @@ const nav: Nav = {
page('`/database`', 'http/database', 'http/database.md'),

section('Internals'),
page('Module ABI Reference', 'webassembly-abi', 'webassembly-abi/index.md'),
page('SATS-JSON Data Format', 'sats-json', 'sats-json.md'),
page('BSATN Data Format', 'bsatn', 'bsatn.md'),
page('Module ABI Reference', 'webassembly-abi', 'internals/webassembly-abi.md'),
page('SATS-JSON Data Format', 'sats-json', 'internals/sats-json.md'),
page('BSATN Data Format', 'bsatn', 'internals/bsatn.md'),

section('Appendix'),
page('Appendix', 'appendix', 'appendix.md'),
Expand Down