Skip to content
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

feat: macros package #324

Merged
merged 2 commits into from
Aug 22, 2024
Merged

Conversation

milancermak
Copy link
Contributor

Pull Request type

Please check the type of change your PR introduces:

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

Description

This PR introduces a new Alexandria package, alexandria_macros. The idea is to group any and all useful macros in here. As an introduction, it also adds a humble pow! macro that calculates x to the power of y. I hope many more will follow.

Because Cairo macros are Rust programs, I added a new separate GitHub workflow just to test macros. Also because of the way macros work (at least to my understanding), I added a macros_tests directory that serves just as a dummy Scarb project to run tests on; it is not part of the Alexandria workspace. Not sure this is the best way to go about it, but having the tests inside the main macros package didn't work for me (i.e. I didn't find a way how to do it, if there's some, I'm happy to amend the PR).

Does this introduce a breaking change?

  • Yes
  • No

Other information

Copy link
Collaborator

@enitrat enitrat left a comment

Choose a reason for hiding this comment

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

lgtm

Co-authored-by: Marek Kaput <[email protected]>
@0xLucqs 0xLucqs merged commit 7c19379 into keep-starknet-strange:main Aug 22, 2024
7 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Aug 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants