Skip to content

Conversation

@coolreader18
Copy link
Collaborator

@coolreader18 coolreader18 commented Feb 11, 2025

Description of Changes

This is possible now that standalone is now a separate binary from cli. This lets us separate concerns, and speed up compilation of the cli.

Expected complexity level and risk

1 - moves some stuff around but otherwise a pretty small change.

Testing

  • No functionality change, tests still pass for codegen for our test modules (for rust, csharp modules).

@coolreader18 coolreader18 force-pushed the noa/rm-core-dep-of-cli branch 3 times, most recently from 71f00ed to 93c50bd Compare February 11, 2025 23:25
@bfops bfops added the release-any To be landed in any release window label Feb 18, 2025
@bfops
Copy link
Collaborator

bfops commented Mar 7, 2025

I'm broadly in favor of improving compile times. +1 to Mario's questions.

Dumb question - what exactly is spacetimedb-core? At first glance, it seems entirely reasonable for the CLI to depend on a core spacetimedb library.

I don't personally feel equipped to confirm that the changes don't do something meaningful, particularly around wasmtime. Can you add a bit more detail to the Testing section about the existing test coverage for generate?

@coolreader18
Copy link
Collaborator Author

spacetimedb-core is the core of the database implementation, and now that is being pulled in by standalone. The CLI only needs to be able to talk to a database, but it doesn't need to run one itself.

@coolreader18 coolreader18 force-pushed the noa/rm-core-dep-of-cli branch from 93c50bd to 9057b09 Compare March 7, 2025 18:45
@coolreader18 coolreader18 requested a review from jdetter as a code owner March 7, 2025 18:45
@coolreader18
Copy link
Collaborator Author

I could copy over Mem and MemView from spacetimedb_core::host::wasmtime, but that would mean there's more code and unsafe duplicated overall, and this only uses a small amount of its functionality.

@coolreader18 coolreader18 force-pushed the noa/rm-core-dep-of-cli branch from 9057b09 to e3f44a0 Compare March 7, 2025 18:50
@coolreader18
Copy link
Collaborator Author

coolreader18 commented Mar 7, 2025

The internal tests are only because Cargo.lock needs regen. I feel like those tests probably shouldn't use --locked

@bfops bfops self-requested a review March 29, 2025 02:00
@coolreader18 coolreader18 force-pushed the noa/rm-core-dep-of-cli branch from 5a63ef3 to ff663c3 Compare March 31, 2025 21:07
@coolreader18 coolreader18 force-pushed the noa/rm-core-dep-of-cli branch from cd8350b to 9c04249 Compare April 9, 2025 16:50
Copy link
Collaborator

@bfops bfops left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okay, this LGTM given the discussions. I'm not sure what to do with @mamcx's remaining comment.

@coolreader18 coolreader18 added this pull request to the merge queue Apr 9, 2025
Merged via the queue into master with commit 68d23d4 Apr 9, 2025
13 of 14 checks passed
@coolreader18 coolreader18 deleted the noa/rm-core-dep-of-cli branch April 9, 2025 20:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-any To be landed in any release window

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants