Skip to content

Dylan/feat: Add "how to compile" for rust #45

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
12 changes: 12 additions & 0 deletions docs/modules/rust/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,18 @@ Now create `server`, our module, which runs in the database:
spacetime init --lang rust server
```

## How to Compile

> [!IMPORTANT]
> You cannot use the traditional `cargo build` to build SpacetimeDB server modules. Keep this in mind when using an IDE that assumes using *cargo* for building.

Above, we just initialized a SpacetimeDB server module at `./server`:

```bash
cd server
spacetime build
```

## Declare imports

`spacetime init` should have pre-populated `server/src/lib.rs` with a trivial module. Clear it out, so we can write a module that's still pretty simple: a bare-bones chat server.
Expand Down