Skip to content

Conversation

@zeddash
Copy link

@zeddash zeddash commented Aug 1, 2025

Making it clear the second part is to be used in conjunction with the first. I didn't know the syntax and thought it was A or B, not A or (A and B).

I got really confused and just an extra word "additional" would have cleared things up and I'd have known I need both.

I read the "Alternatively" as "that one has a rustflag check, this one doesn't"

Making it clear the second part is to be used in conjunction with the first. I didn't know the syntax and thought it was A or B, not A or (A and B).
@benfrankel
Copy link
Collaborator

benfrankel commented Aug 1, 2025

I read the "Alternatively" as "that one has a rustflag check, this one doesn't"

This is correct. The patch only removes the rustflags check and nothing else.

Basically it's "feature and rustflags" or "feature and patch".

@zeddash
Copy link
Author

zeddash commented Aug 1, 2025

Wouldn't that then mean you just need the second and not both? It only started to work when I enabled both

[target.wasm32-unknown-unknown.dependencies]
getrandom = { version = "0.3", features = ["wasm_js"] }

and

[patch.crates-io]
getrandom = { git = "https://github.com/benfrankel/getrandom" }

But I was reading it that I could just use the patch

@benfrankel
Copy link
Collaborator

benfrankel commented Aug 2, 2025

Yes, in either case you have to add getrandom as an explicit dependency in order to specify the wasm_js feature on it. "Alternatively" only relates to the rustflags section. Maybe it would be more clear with a newline between the two sections.

@zeddash
Copy link
Author

zeddash commented Aug 2, 2025 via email

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

Successfully merging this pull request may close these issues.

2 participants