Skip to content

Conversation

integraledelebesgue
Copy link
Contributor

@integraledelebesgue integraledelebesgue commented Jul 14, 2025

Reverts #123

size-of crate is unmaintained and doesn't compile on architectures other than x86 when Rust version is >1.89.
See the issue in size-of and explanation of the error in Rust compiler.

Pull Request type

Please add the labels corresponding to the type of changes your PR introduces:

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no API changes)
  • Build-related changes
  • Documentation content changes
  • Testing
  • Other (please describe):

What is the current behavior?

Resolves: #NA

What is the new behavior?

Does this introduce a breaking change?

Theoretically, this is a breaking change. However, no crate actually uses the implementation of SizeOf, so in practice it isn't.

Other information

@victorkstarkware
Copy link
Collaborator

Reverts #123

size-of crate is unmaintained and doesn't compile on architectures other than x86 when Rust version is >1.89. See the issue in size-of and explanation of the error in Rust compiler.

Pull Request type

Please add the labels corresponding to the type of changes your PR introduces:

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no API changes)
  • Build-related changes
  • Documentation content changes
  • Testing
  • Other (please describe):

What is the current behavior?

Resolves: #NA

What is the new behavior?

Does this introduce a breaking change?

Theoretically, this is a breaking change. However, no crate actually uses the implementation of SizeOf, so in practice it isn't.

Other information

The size-of crate was required in https://github.com/starkware-libs/sequencer/. In particular, the SizeOf trait needed to be implemented for Felt, which, due to Rust's orphan rule, had to be implemented in this repository.

I've switched the use of size-of to an internal crate in https://github.com/starkware-libs/sequencer/ (see starkware-libs/sequencer#8002), so it should no longer be required, at least as far as the sequencer is concerned.

@integraledelebesgue
Copy link
Contributor Author

Reverts #123
size-of crate is unmaintained and doesn't compile on architectures other than x86 when Rust version is >1.89. See the issue in size-of and explanation of the error in Rust compiler.

Pull Request type

Please add the labels corresponding to the type of changes your PR introduces:

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no API changes)
  • Build-related changes
  • Documentation content changes
  • Testing
  • Other (please describe):

What is the current behavior?

Resolves: #NA

What is the new behavior?

Does this introduce a breaking change?

Theoretically, this is a breaking change. However, no crate actually uses the implementation of SizeOf, so in practice it isn't.

Other information

The size-of crate was required in https://github.com/starkware-libs/sequencer/. In particular, the SizeOf trait needed to be implemented for Felt, which, due to Rust's orphan rule, had to be implemented in this repository.

I've switched the use of size-of to an internal crate in https://github.com/starkware-libs/sequencer/ (see starkware-libs/sequencer#8002), so it should no longer be required, at least as far as the sequencer is concerned.

Thank you! Is it possible to use an internal crate in starknet-types-core too? We cannot compile the Cairo compiler, LS and linter as long as size-of is present here

@victorkstarkware
Copy link
Collaborator

Reverts #123
size-of crate is unmaintained and doesn't compile on architectures other than x86 when Rust version is >1.89. See the issue in size-of and explanation of the error in Rust compiler.

Pull Request type

Please add the labels corresponding to the type of changes your PR introduces:

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no API changes)
  • Build-related changes
  • Documentation content changes
  • Testing
  • Other (please describe):

What is the current behavior?

Resolves: #NA

What is the new behavior?

Does this introduce a breaking change?

Theoretically, this is a breaking change. However, no crate actually uses the implementation of SizeOf, so in practice it isn't.

Other information

The size-of crate was required in https://github.com/starkware-libs/sequencer/. In particular, the SizeOf trait needed to be implemented for Felt, which, due to Rust's orphan rule, had to be implemented in this repository.
I've switched the use of size-of to an internal crate in https://github.com/starkware-libs/sequencer/ (see starkware-libs/sequencer#8002), so it should no longer be required, at least as far as the sequencer is concerned.

Thank you! Is it possible to use an internal crate in starknet-types-core too? We cannot compile the Cairo compiler, LS and linter as long as size-of is present here

As far as I understand, it is not currently being used

@tdelabro tdelabro merged commit c50ed21 into starknet-io:main Jul 22, 2025
3 checks passed
@integraledelebesgue integraledelebesgue deleted the remove-size-of branch July 23, 2025 13:04
dorimedini-starkware added a commit that referenced this pull request Sep 15, 2025
dorimedini-starkware added a commit that referenced this pull request Sep 15, 2025
dorimedini-starkware added a commit that referenced this pull request Sep 15, 2025
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.

4 participants