ApeWorX / archive-ape-cairo

Cairo programming language compiler plugin for the Ape Framework
https://www.apeworx.io/
Apache License 2.0
8 stars 6 forks source link

feat: implement 'CompilerAPI' using 'starknet_compile' #1

Closed antazoey closed 2 years ago

antazoey commented 2 years ago

What I did

Implement a cairo compiler plugin.

How I did it

Using starknet-compile command (Note: this is different than cairo-compile).

Questions:

  1. How do we want to handling versioning? (This is the biggest TODO left probably)
  2. Starknet - Cairo contracts do not have a ContractType, what should we do? Using the file name kind of works, but not sure how that may scale across bigger more complex projects that could potentially have duplicate file names (e.g. contracts/storage/storage.cairo and contracts/tokens/storage.cairo both being called storage).
  3. Do we want to also support cairo-compile or do we want to focus only on Starknet?

How to verify it

cd tests
ape compile

Then, look at the resulting .build/__local__json and see if it makes sense.

Checklist