Skip to content

Conversation

@jglanz
Copy link
Collaborator

@jglanz jglanz commented Oct 30, 2025

Change Description

API Changes

  • API Changes

Documentation Additions

  • Documentation Additions

// Use the enum's integer (underlying) type for storage mapping
td.type = translate_type(ED->getIntegerType());
if (!td.new_type_name.empty() && !td.type.empty()) {
_abi.typedefs.insert(td);
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't see any tests for this.
Did you verify this works with abieos and abi_serializer of wire-sysio and WharfKit?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I did verify in abieos and a system contract depot, was the test point.

The problem with writing a test, is that the actual source is in cdt, but the compilation unit is in cdt-llvm...happy to have a quick chat and discuss?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

…nk creation.

## ADDED `ENUM` SUPPORT: `abigen` support via `typedef` for `enum` (NOT `enum class`)

Generated ABI with the inclusion of `enum` types.
```json
{
    ...,
    "version": "sysio::abi/1.2",
    "types": [
        {
            "new_type_name": "chain_kind",
            "type": "uint8"
        }
    ],
    ...
}
```

## ++ Eliminated unnecessary `make_directory` and `create_symlink` calls from CMake macros, streamlining the installation process. Added support for handling plain C++ enums in `abigen`, allowing typedefs to map enums to their underlying storage types.
…olchain-tester`.

- Introduced abigen test example for enum support with corresponding ABI JSON.
- Re-added required header `bluegrass/meta/preprocessor.hpp`.
@jglanz jglanz force-pushed the feature/WIRE-194-abigen-support-enum branch from 2f05ff6 to 1bdf904 Compare November 10, 2025 20:42
@jglanz jglanz merged commit 1da6a00 into master Nov 10, 2025
2 of 3 checks passed
jglanz added a commit to Wire-Network/wire-sysio that referenced this pull request Nov 10, 2025
jglanz added a commit to Wire-Network/wire-sysio that referenced this pull request Nov 25, 2025
jglanz added a commit to Wire-Network/wire-sysio that referenced this pull request Nov 25, 2025
@bearcubsvet bearcubsvet deleted the feature/WIRE-194-abigen-support-enum branch December 12, 2025 17:49
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.

3 participants