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

subxt: brings in tls dependencies when default-features = false && features = ["native"] #1812

Open
niklasad1 opened this issue Oct 4, 2024 · 0 comments

Comments

@niklasad1
Copy link
Member

niklasad1 commented Oct 4, 2024

Hey hey,

I'm using the following config for subxt:

[package]
name = "..."
version = "0.1.0"
edition = "2021"

[dependencies]
subxt = { git = "https://github.com/paritytech/subxt", default-features = false, features = ["native"], branch = "master" }
tokio = { version = "1.40.0", features = ["rt-multi-thread", "macros", "time"] }
futures = "0.3"
serde_json = "1"

This config ends up leads to a bunch of TLS dependencies which I'm not expecting to see:

   Compiling rustls-pki-types v1.9.0
   Compiling rustls v0.23.14
   Compiling rustls-pemfile v2.2.0
   Compiling rustls-native-certs v0.7.3
   Compiling rustls-webpki v0.102.8
   Compiling tokio-rustls v0.26.0
   Compiling rustls-platform-verifier v0.3.4
   Compiling hyper-rustls v0.27.3
    Checking subxt-riscv-example v0.1.0 (/home/niklasad1/Github/temp/subxt-jsonrpsee-no-tls)

subxt-macro leaks jsonrpsee because of this and ideally subxt-codegen dependency should just be dev-dependency i.e, fetch the metadata at compile time and it shouldn't be needed as a dependency but maybe some reason that I don't follow :)

If that doesn't work we need to add way to feature-gate fetch_metadata_from_url from the macro.

//cc @jsdw @lexnv

@niklasad1 niklasad1 changed the title subxt: brings in tls dependencies when default-features = false && features = ["native] subxt: brings in tls dependencies when default-features = false && features = ["native]" Oct 4, 2024
@niklasad1 niklasad1 changed the title subxt: brings in tls dependencies when default-features = false && features = ["native]" subxt: brings in tls dependencies when default-features = false && features = ["native"] Oct 4, 2024
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

No branches or pull requests

1 participant