Commit Graph

49 Commits

Author SHA1 Message Date
Phoebe Goldman 8cc46d00e2 insta 2025-02-03 09:47:19 -05:00
Jeffrey Dallatezza e2ffc07997 Implement incremental subscriptions on the client (#2111)
Co-authored-by: Zeke Foppa <196249+bfops@users.noreply.github.com>
2025-01-31 18:02:50 +00:00
Noa 293aebaef9 Bump to Rust 1.84 (#2001) 2025-01-28 23:11:29 +00:00
Noa cf6ac18eaf Lookup lifecycle reducers by lifecycle flag, not by name (#2132) 2025-01-17 23:21:52 +00:00
Phoebe Goldman 44d7b76d29 Fix defining multiple tables on the same struct in Rust modules (#2103) 2025-01-10 01:58:20 +00:00
Phoebe Goldman a4b46c5ddb Implement the identity host call and ctx.identity() in Rust (#2085) 2025-01-03 19:09:34 +00:00
Phoebe Goldman d9de1e3943 Rust SDK: no more reducer args structs (#2036) 2024-12-04 17:00:27 +00:00
Ingvar Stepanyan 3902f7562e Migrate C# client-side reducer enum to the new syntax (#2033) 2024-12-04 16:41:16 +00:00
Phoebe Goldman 80dff96723 Rust SDK: Actual client-side indices for unique constraints (#1909) 2024-11-29 18:29:08 +00:00
Noa 94c66c97da Don't autogen schedule fields (#1894)
Co-authored-by: Phoebe Goldman <phoebe@goldman-tribe.org>
2024-11-22 18:39:39 +00:00
Mazdak Farrokhzad ac0053caab Websocket API: Light transaction updates & NoSuccessNotify (#1812)
Signed-off-by: Mazdak Farrokhzad <twingoow@gmail.com>
Co-authored-by: Phoebe Goldman <phoebe@clockworklabs.io>
2024-11-04 15:59:11 +00:00
Jeremie Pelletier 1328b5d6a0 C# codegen making state relative to a DbConnection (#1869) 2024-10-30 20:55:30 +00:00
Phoebe Goldman 437eed7760 Rust modules: Revise BTreeIndexBounds (#1815) 2024-10-22 14:49:32 +00:00
Jeremie Pelletier 02b70d5c94 c# client generate (#1707) 2024-10-04 04:12:15 +00:00
Tyler Cloutier fe62e13644 Small fixes to TypeScript codegen (#1800) 2024-10-03 17:10:36 +00:00
Tyler Cloutier 0eb147e132 Implemented TypeScript SDK proposal codegen (#1776) 2024-10-02 06:24:58 +00:00
Mazdak Farrokhzad 1ac741aa6b Generic and optimized WebSocket API (#1761)
Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2024-09-30 21:57:00 +00:00
Phoebe Goldman b7d2e3d61d Rework Rust SDK for new API (#1692) 2024-09-30 14:20:55 +00:00
Noa f6bc6dcfe5 Switch Rust codegen to use new ModuleDef (#1675) 2024-09-17 18:32:35 +00:00
Tyler Cloutier 3530498b88 Switched table names to singular (#1684)
Co-authored-by: Phoebe Goldman <phoebe@goldman-tribe.org>
2024-09-11 11:11:51 -04:00
Noa bdf94f1fb3 Fix table codegen wrt table names (#1689) 2024-09-11 09:39:15 -04:00
Noa 8daab8e20f Impl macro rework (#1314) 2024-09-09 23:30:31 +00:00
Ingvar Stepanyan 607f7ce6b8 Auto-generate C# ModuleDef bindings from Rust (#1680) 2024-09-09 18:22:17 +00:00
james gilles 747eb71830 Make ScheduleAt special + Typespace::is_valid_for_client_code_generation (#1590) 2024-08-22 17:05:04 +00:00
Mazdak Farrokhzad 1e8e18d74b Add support for I256 and U256 (#1477) 2024-08-08 18:40:35 +00:00
Mazdak Farrokhzad 3340ceea8a SATS: Flatten AlgebraicType, getting rid of BuiltinType (#1559)
Signed-off-by: Mazdak Farrokhzad <twingoow@gmail.com>
Signed-off-by: joshua-spacetime <josh@clockworklabs.io>
Co-authored-by: joshua-spacetime <josh@clockworklabs.io>
2024-08-06 18:15:19 +00:00
Ingvar Stepanyan 7500ea33fb C#: remove using SpacetimeDB.ClientApi; (#1546) 2024-07-25 18:43:14 +00:00
Shubham Mishra 276387d2b3 Timer Table Implementation (#1449)
Co-authored-by: Ingvar Stepanyan <me@rreverser.com>
2024-07-16 08:38:56 +00:00
Noa 10b151b999 Protobufectomy: server (#1077)
Co-authored-by: Phoebe Goldman <phoebe@goldman-tribe.org>
Co-authored-by: Jeremie Pelletier <jeremiep@gmail.com>
2024-07-12 18:02:18 +00:00
SteveBoytsun 81085b0817 Fixed exceptions in C# SDK when someone disconnects or when a transaction originates from CLI (#1461)
Co-authored-by: Steve Boytsun <steve@clockwokrlabs.io>
2024-06-26 17:39:12 +00:00
Ingvar Stepanyan 4b7eff66da Generate tagged enums in C# client code (#1421) 2024-06-13 16:32:46 +00:00
Ingvar Stepanyan d1033b5d93 Shared C# codegen for BSATN (#1312)
Signed-off-by: Ingvar Stepanyan <me@rreverser.com>
Co-authored-by: james gilles <jameshgilles@gmail.com>
Co-authored-by: John Detter <no-reply@boppygames.gg>
2024-06-07 19:22:02 +00:00
Mazdak Farrokhzad 5e47b61f8a Tables only become public explicitly via #[spacetimedb(table(public))] (#1278)
* make user tables private by default and define privacy via attribute

* switch to spacetimedb(table(public)) syntax

* accept codegen snap changes

* sdk: use public in define_tables!

* bindings-macro: adjust some doc comments

* sdk-test-connect-disconnect: make Connected/Disconnected public tables

* Make Public Private again
2024-06-03 11:22:58 +00:00
Ingvar Stepanyan 9e1e66f708 Fix FilterBy regression in C# (#1309)
* Fix FilterBy regression in C#

Fixes regression accidentally introduced in #1277: if FindBy returns null, FilterBy will return an iterable with a single null item instead of an empty iterable.

* Fix snapshots
2024-05-31 17:40:26 +00:00
Ingvar Stepanyan ac0c097f3d Implement consistent filtering rules for TypeScript (#1276)
- Limit types to those defined in the consistent filtering proposal (#1256).
- Make `filterBy` a lazy iterable for consistency and performance reasons.
- Add `findBy` for unique fields as per proposal.
2024-05-28 14:23:25 +00:00
Ingvar Stepanyan 307dfeebd3 Update C# codegen to consistent filtering rules (#1277)
* Update C# codegen to consistent filtering rules

- Limit types as per proposal.
- Add `Query` client-side SDK helper for API parity with server-side modules (on client-side it's a simple wrapper around Iter + Where).
- Change return type of `FilterBy` to always be iterable, with new `FindBy` function for unique fields.
- Simplify the way primary keys are handled - must go with https://github.com/clockworklabs/spacetimedb-csharp-sdk/pull/93 for the client SDK counterpart.

* Add using for System.Linq

* Update snapshot
2024-05-28 14:22:12 +00:00
Ingvar Stepanyan f5a13b6f26 Consistent filtering in Rust client + minor fixes (#1275)
* Extend codegen tests to Rust

* Replace cursive-chat module_bindings with symlink

* Implement consistent filtering rules for Rust

* Fixup

* Regenerate tests

* Fix non-deterministic import order

* cargo fmt

* Fix chat examples

* Change symlinks to files themselves

* Revert accidental change

This needs to wait for server-side API break to be implemented as well.
2024-05-28 13:02:25 +00:00
Ingvar Stepanyan e252b0cf63 Remove RowUpdate event from C# (#1190)
We talked about this for a while, so decided to do this in a separate PR.
2024-05-10 21:41:16 +00:00
Ingvar Stepanyan 165f750d73 Remove C# GetArgsAsObjectArray (#1188)
* Remove C# GetArgsAsObjectArray

This is a weird "duck-typed" API that has one usage in BitCraft, but it's easy to replace with either real reflection or strong-typed interfaces.

* Update csharp.rs

Signed-off-by: Ingvar Stepanyan <me@rreverser.com>

---------

Signed-off-by: Ingvar Stepanyan <me@rreverser.com>
2024-05-03 01:48:05 +00:00
Ingvar Stepanyan 27a7b67608 NFC: reuse common parts of C# generation (#1187)
Reuse the `indented_block` helper more and add new `CsharpAutogen` helper structure for consistent header / footer structure and reduced boilerplate.
2024-04-30 18:31:36 +00:00
Ingvar Stepanyan 45f6cd6f0c Fix codegen tests (#1146)
While working on the new C# codegen, I accidentally noticed that those tests were passing even when they clearly should've been failing due to changed output.

After running with `--nocapture`, I found out it's because the tests are silently skipped and reported as successful when `rust_wasm_test.wasm` isn't built.

This further led to finding that `rust_wasm_test.wasm` is never built - the relevant module results in `rust_wasm_test_module.wasm` instead - so these tests have been incorrectly passing for ages.

This PR changes them to actually build the module as part of testing and updates the snapshots to latest master.
2024-04-24 14:03:03 +00:00
Mazdak Farrokhzad 344861f290 use nohasher_hash and ahash instead of siphash13 (#1040)
* use nohasher_hash and ahash instead of siphash13

* re-export types in spacetimedb_data_structures::map
2024-04-05 17:30:51 +00:00
SteveBoytsun 9dc90bb04c Fixed json serializer getting progressively slower (#226)
Co-authored-by: Steve <steve@codefics.com>
2023-09-11 12:35:01 -05:00
Piotr Sarnacki 5669f58730 Add reducerEvent in callbacks (#23) 2023-08-01 23:17:02 +02:00
Piotr Sarnacki 90d93c9c69 [TypeScript] Add primary key annotation in TypeScript's autogen (#24) 2023-08-01 23:17:02 +02:00
SteveBoytsun 877664d886 Making C# reducer args classes partial (#28)
Co-authored-by: Steve <steve@codefics.com>
2023-08-01 23:17:02 +02:00
SteveBoytsun dcbd31b0db Charp indexes (#14)
* Changed C# reducer signature; Change reducer invocation method to return wether or not reducer has subscribers; Moved all ReducerEvent and ReducerArgs code into a single file

* Formatting, tests

* Clippy

* Removed union from C# codegen

* Tests

* Update crates/cli/src/subcommands/generate/csharp.rs

Co-authored-by: Tyler Cloutier <cloutiertyler@users.noreply.github.com>
Signed-off-by: John Detter <4099508+jdetter@users.noreply.github.com>

* Removed duplicate code

* Lint

* Clippy

* CLIPPY

* Generating custom indexes for unique / primary keys

---------

Signed-off-by: John Detter <4099508+jdetter@users.noreply.github.com>
Co-authored-by: Steve <steve@codefics.com>
Co-authored-by: John Detter <4099508+jdetter@users.noreply.github.com>
Co-authored-by: Tyler Cloutier <cloutiertyler@users.noreply.github.com>
2023-08-01 23:17:02 +02:00
SteveBoytsun eb205ec38c Changed C# reducer signature; Change reducer invocation method to return wether or not reducer has subscribers; Moved all ReducerEvent and ReducerArgs code into a single file (#10)
Co-authored-by: Steve <steve@codefics.com>
2023-08-01 23:17:02 +02:00
Tyler Cloutier 44df6c6e7d Initial commit 2023-08-01 23:16:37 +02:00