-
Notifications
You must be signed in to change notification settings - Fork 177
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
[WASM ABI 1.0] Change ColId
from u32
to u16
#1597
Conversation
55c7896
to
567fa08
Compare
f087d69
to
1b6212c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All makes sense.
I guess I should change names in my other PR to ABI v10? Or maybe we should detach the RawModuleDef
version from the WASM ABI version.
@@ -218,20 +218,36 @@ impl FromIterator<AlgebraicType> for Typespace { | |||
} | |||
} | |||
|
|||
/// A trait for types that can be represented as an `AlgebraicType` | |||
/// A trait for Rust types that can be represented as an [`AlgebraicType`] | |||
/// with an empty typing context. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's slightly stronger than this.
Because e.g. (x: (y: u8) | (z: u16))
satisfies this condition, but I believe should not be considered a "ground type". This is because AlgebraicType
contexts is very flexible -- you can either directly include a SumType
in a ProductType
, or you can include it behind a Ref
.
AlgebraicTypeUseForGenerate
that we discussed in #1590 will resolve this since it will only allow Sum
or Product
types behind Ref
. Once that's defined, we can say "can be represented as AlgebraicTypeUseForGenerate
without any Refs
." (man, that's a mouthful...)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Formally the type you mentioned is a ground type though. It has no free variables, which is the definition of a "ground term" / expression.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I did not know that was a standard term :) I thought it just meant "builtin".
Yeah probably, for now, and in any case, I'd like to lower the ABI to |
Description of Changes
ColId
to beu16
, as per https://github.com/clockworklabs/SpacetimeDBPrivate/pull/863.GroundSpacetimeType
for the{Identity, ColId, ...}::get_type
cases to ensure that cases don't get missed.create_index
, , as per https://github.com/clockworklabs/SpacetimeDBPrivate/pull/863. There were no users in the high level API.cc #1460
API and ABI breaking changes
The actual ABI signature doesn't change here as WASM represents u16 as u32, but the behavior does change.
Expected complexity level and risk
2
Testing
ColList
tests were run through miri.