Skip to content

Conversation

@sd2k
Copy link
Owner

@sd2k sd2k commented Oct 3, 2025

This adds support for resources to gravity. It's a pretty huge change and I'm not sure it's ready for review yet (or maybe ever), but it's a decent PoC. Much of the code was written by Claude with a huge amount of guidance, so it will probably need some cleanup.

The main limitations are a lack of support for 'owned' resources as parameters because it involves a lot of complexity re. tracking ownership of resources. Even so this is quite useful for many things.

Relates to arcjet#5.

@sd2k sd2k force-pushed the support-resources branch 3 times, most recently from a8d3d19 to c221a10 Compare October 7, 2025 09:13
@sd2k sd2k force-pushed the support-resources branch from c221a10 to 3c3c5d2 Compare October 7, 2025 09:18
@sd2k sd2k force-pushed the support-resources branch from 3c3c5d2 to f1b9d5e Compare October 7, 2025 09:43
@sd2k sd2k force-pushed the support-resources branch from f1b9d5e to d7f9e59 Compare October 14, 2025 20:53
sd2k added 14 commits October 14, 2025 15:09
This change replaces the previous string-specific option handling with a
generic method using reflection to check for zero values. It supports
optional types beyond just strings by using `reflect.ValueOf().IsZero()`
to determine emptiness.
Includes type generation and instructions for tuple lowering/lifting,
as well as basic tests. Supports both anonymous tuples and type
aliases.
This adds support for resources to gravity. It's a pretty huge change
and I'm not sure it's ready for review yet (or maybe ever), but it's a
decent PoC. Much of the code was written by Claude with a huge amount of
guidance, so it will probably need some cleanup.

The main limitations are a lack of support for 'owned' resources as
parameters because it involves a lot of complexity re. tracking
ownership of resources. Even so this is quite useful for many things.

Relates to arcjet#5.
@sd2k sd2k force-pushed the support-resources branch from d7f9e59 to 2621de1 Compare October 15, 2025 20:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants