Commit Graph

74 Commits

Author SHA1 Message Date
Mazdak Farrokhzad 1e8e18d74b Add support for I256 and U256 (#1477) 2024-08-08 18:40:35 +00:00
Ingvar Stepanyan db16a0959c Minor NFC improvements to C# Roslyn codegen (#1562) 2024-08-06 08:26:33 +00:00
Ingvar Stepanyan 30c000f6a9 C#: ignore fields in partial declaration not marked with BSATN attribute (#1545) 2024-07-25 16:32:15 +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
Ingvar Stepanyan 6f0f20bf7a Restructure C# SpacetimeDB runtime (#1455) 2024-07-12 17:12:21 +00:00
Ingvar Stepanyan c94a55178c Roslyn cacheability testing and fixes (#1420) 2024-06-18 19:07:48 +00:00
Ingvar Stepanyan 2b7b19ec18 [C#] [NFC] Use semantic model's type where possible (#1401) 2024-06-12 21:50:51 +00:00
Ingvar Stepanyan e73ea7932c Add Option SDK tests (#1405) 2024-06-12 21:16:08 +00:00
Ingvar Stepanyan 0b99e10735 [NFC] [C#] Minor simplifications to type checks in Roslyn codegen (#1400) 2024-06-12 17:34:21 +00:00
Ingvar Stepanyan d11c83e53c Add explicit parameter for table visibility (#1359) 2024-06-10 13:38:38 +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
Ingvar Stepanyan a7c75751f2 Implement consistent filtering rules for C# modules (#1282) 2024-05-28 14:08:40 +00:00
Noa 471f4ff2ca recv-style abi (#1002)
* Bump module abi version

* recv abi module side

* recv abi host side

* Update csharp module sdk

* Fix name

* Address comments
2024-05-22 23:01:44 +00:00
Ingvar Stepanyan 125ca70959 Switch to a better API for tagged enums for C# (#1177)
With C# records - which are available since C# 9, so covers Unity requirements as well - we can use subclassing and pattern matching to get sum types that look a lot more like Rust tagged enums.

This is a breaking change but IMO worth it for the better API going forward.
2024-05-10 22:05:18 +00:00
Ingvar Stepanyan fe44011e4f C#: rename DbEventArgs to ReducerContext (#1191)
* C#: rename DbEventArgs to ReducerContext

This is no longer an event type, so remove subclassing and rename to match the Rust API.

* Update ReducerContext argument name
2024-05-08 14:00:32 +00:00
Ingvar Stepanyan 5cc05b173b NFC: few more C# shorthand syntax conversions (#1176)
* NFC: few more C# shorthand conversions

For some reason these automated refactoring conversions didn't get included in #1149.

* Also remove unused usings

* Restore a using that was erroneously marked as unused
2024-04-30 00:39:45 +00:00
Ingvar Stepanyan 02d0428151 C#: add experimental NativeAOT-LLVM support (#713)
* Add experimental NativeAOT-LLVM support

* Fix codegen ambiguity

* Restore logging redirect
2024-04-03 18:23:39 +00:00
Ingvar Stepanyan 79b2d04210 C# SDK tests (#706)
* Add C# SDK tests

* Add memoization

* Increase timeout

* Mark module_bindings as LF

* Regenerate from Rust again

* Sort tables & reducers for determinism

* cargo fmt

* Lint & fmt fixups

* Lint fixups

* Allow dirs ending in .wasm
2024-01-16 18:09:43 +00:00
Ingvar Stepanyan 6c40e840f5 Various fixes for C# column attrs
- Fixed column position in sequences (it used index after filtering instead of actual column index).
 - Fixed sequence definitions conflicting with automatic sequences derived from Constraints.
 - Removed constraints for columns that don't have any.
 - Hid internal fields + more minor refactorings.
2023-12-07 12:18:52 +00:00
Ingvar Stepanyan ed9b866c1a Restore old meaning of public ColumnAttrs enum
This is user-facing API that's used in docs & examples, so renaming the internal ColumnAttrs to ColumnDefWithAttrs and ConstraintFlags back to ColumnAttrs so that public examples & existing projects can still compile.
2023-12-07 12:18:52 +00:00
Ingvar Stepanyan 395b86c5ec Reformat C# (with CSharpier) 2023-12-07 12:18:52 +00:00
Mario Montoya 4ef1bd5296 Refactoring bootstrapping and adding full support for constraints & multi-column indexes (#596)
* Refactoring bootstrapping and adding full support for constraints & multi-column indexes

* Removed deleted code and add some comments

* Add comment for Constraints

* Update crates/core/src/db/datastore/locking_tx_datastore/mod.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>
Signed-off-by: Mario Montoya <mamcx@elmalabarista.com>

* Update crates/core/src/db/datastore/locking_tx_datastore/mod.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>
Signed-off-by: Mario Montoya <mamcx@elmalabarista.com>

* Addressing some PR comments & remove cloning

* Adding details for when fail to decode rows in replay

* Apply Kim's fix for replay bug

* Addressing some PR comments

* Merge

* Fix conflicts

* Fix conflicts

* Fix test

* Fix generation of code for csharp & typescript, now it generate FilterBy for all columns

* Fix for index generation

* Fixing C# index generation

* Merge

* Fix compilation on csharp bindings

---------

Signed-off-by: Mario Montoya <mamcx@elmalabarista.com>
Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>
Co-authored-by: John Detter <no-reply@boppygames.gg>
2023-12-04 12:04:38 -05:00
Ingvar Stepanyan 4f74a5c5c6 Move to .NET 8 WASI support (#587) 2023-11-30 14:54:26 +00:00
Ingvar Stepanyan 1b9e35129c Move C# bindings into the tree (#324)
This allows to make and test ABI-breaking changes much more easily than before.

For now moved them under crates/bindings-csharp - on one hand, it's not a crate, but on another it's the most logical place within our current project structure if we think of `crates` folder as general `projects` folder.
2023-09-26 15:33:30 +00:00