anza-xyz / anza-xyz/solana-sdk

Re-export publicly used types

Offen
#106 3 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Rust
Sterne
256
Forks
250
Ø Merge
2 T. 3 Std.
Gemergte PRs (30 T.)
39

Beschreibung

Crates splitting is a bit too extreme at the moment IMO, some types are required when using a crate, but they are defined elsewhere and has to be imported separately, this will cause problem when you have more major versions in the future, because the crates need to be compatible with each other.

Some examples:
- `solana-signer`: Pubkey and Signature types is in `Signer` trait definition
- `solana-keypair`: should add a new `signer` feature flag to gate `impl Signer`, and re-export needed type when the feature is activated.
- `solana-client`: `CommitmentConfig`, `Signature`, `Pubkey`
There are probably many more.

There is also ergonomic problems, e.g. if my code need to sign a message, I have to import 4 crates: keypair, pubkey, signature, signer;

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.