Comments (13)
A better approach is to just move all binary targets to a dedicated package called cairo-cli
, like what's done in foundry
:
(this makes installing all the binaries easy, but we still need to rename the binaries as suggested).
from cairo.
Yeah if we eventually want to put this on crates.io then crate names should also be made cairo/starknet-speicifc.
That's actually already an issue, because I have to use these super generic names in package manager code:
from cairo.
To make this PR manageable/reviewable and minimize the impact on other pending PRs, I will implement it as a script so that only the script needs to be reviewed. The PR itself can then be verified by running the script on the merge base to see if the exact same patch is generated. Pending PRs that are getting conflicts can simply have them resolved by running the script.
from cairo.
To demo how such a refactor would look like, I've created a fork with the addition of a cairo-cli
package containing all 7 CLI targets, in which you can just install all 7 binaries like this:
$ cargo install --locked --path cli
---- SNIP ----
Installed package `cairo-cli v0.1.0` (executables `cairo-compile`, `cairo-fmt`, `cairo-lsp`, `cairo-run`, `sierra-compile`, `starknet-compile`, `starknet-sierra-compile`)
(Using symlinks in my fork to make it easier to rebase. In an actual refactor files should be moved instead)
Not submitting the unsolicited PR until I get confirmation from the team that this is actually desired.
from cairo.
What's more, this also applies to crate names.
from cairo.
What's more, this also applies to crate names.
Yeah if we eventually want to put this on crates.io then crate names should also be made cairo/starknet-speicifc.
Btw I've squatted the cairo-cli
crate name just in case one day this project goes on crates.io.
from cairo.
O think that's a good idea. Renaming crates and executables.
I'd like to get such a PR. @orizi ? Wdyt?
One question - generate_syntax isn't supposed to be an exposed binary, it's just a utility for generating source code.
from cairo.
it sounds like a good idea.
from cairo.
Thanks! So I guess the consensus here is to get this resolved early on to avoid breaking even more stuff later down the road.
Then I think the next logical step would be to determine which crates need renaming, and to what.
There are a total of 24 crates in this project. We already know that the syntax_codegen
is just for internal codegen (won't get published on crates.io), so it doesn't need to be renamed.
On top of that, plugins
seems to be only used in tests, so it won't get published either.
That should leave us with the following crates:
(Update: table moved to opening post for better visibility. Removing this one to avoid confusion.)
12 crate names are already taken on crates.io. We have to rename those if we want to eventually bring the whole thing on crates.io. Personally I think some names are way too generic even if available anyways.
Obviously I don't know the codebase good enough to come up with the best names. So this is totally just a suggestion. WDYT?
(I think we still need the new cairo-cli
crate for making it easy to install the whole thing, but that one's easy to do once we get this resolved.)
from cairo.
I think every crate should be prefixed with cairo. I think we just didn't know these names correspond to package names on crates.io when we started writing.
from cairo.
Got it. Thanks for the input. Would you like to simply prefix cairo-
to all the current names?
My suggestions were based on this prefix-adding principle, while:
- applying abbreviation/simplification where applicable, which helps prevent overly long crate names (e.g.
cairo-diagnostics-proc-macros
) - leaving the
sierra-*
crates unprefixed since they're already prefixed bysierra-
- using
-
instead of_
Please kindly let me know your preferences. Would love to push this forward and secure (squat) the crate names.
Btw I just moved the table from the comment to the opening post for better visibility.
from cairo.
This sounds good to me. Though, I don't like the dxs abbreviation. I don't mind having a long name, so I prefer diagnostics
Other than that, would love to get a PR:)
from cairo.
Sounds good! Will submit PR. Thanks!
from cairo.
Related Issues (20)
- bug: visibility issue for `nullable_from_box` function HOT 2
- bug: LS attempts to load Cairo0 source files
- feat: better error reporting with wrong use of unwrap HOT 1
- bug: contract_address_const::<0x800000000000011000000000000000000000000000000000000000000000000> error HOT 1
- Compilation Bug: itertools: .zip_eq() reached end of one iterator before the other HOT 2
- Storage maps
- Individual storage access
- Associated items
- sha256 support
- Arithmetic circuits support
- call_contract_syscall causes a call to revert on Starknet but not in local HOT 2
- feat: Div impl for signed intergers
- bug: Variable was previously moved HOT 1
- Fixed size arrays HOT 1
- bug: cannot escape curly brace in format string HOT 1
- bug: Compiler panics from `compute_expr_function_call_semantic` HOT 3
- bug: cairo test case test_ecdsa_recover_public_key fails HOT 3
- bug: gas computation / unexpected cycle in computation issue with recursive type definition HOT 6
- Bring back "Type Info" feature
- feat: คอมไพล์
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cairo.