Comments (3)
Thanks @daxpedda. I investigated all the SubtleCrypto
methods and I believe they can all take shared references.
I opened PR #3797 making the change.
from wasm-bindgen.
I notice a few other uses of &mut
in SubtleCrypto
methods that seem suspicious, e.g. verify_with_xxx_and_yyy_and_u8_array
methods accept data: &mut [u8]
. This refers to the data over which a signature should be verified; mutating the data would be quite unexpected.
from wasm-bindgen.
See The wasm-bindgen
Guide on "Type Translations in web-sys".
We can add exceptions here:
wasm-bindgen/crates/webidl/src/constants.rs
Lines 43 to 99 in 55a7fb8
I'm happy to review a PR adding exceptions to any SubtleCrypto
methods.
from wasm-bindgen.
Related Issues (20)
- Allow closures to take by reference HOT 2
- Providing a closure as member of a parameter object to pass to an JS function
- How to use static linked C++ library via FFI
- Add support to execute tests in workerd HOT 6
- Rust/C++ Interop
- wasm_bindgen::module is currently only supported with `--target no-modules` and `--target web`
- Unable to resolve version issue HOT 5
- Weak references fails to automatic garbage collect HOT 4
- Schema Version Mismatch Error when Using `cargo leptos watch` in WSL Ubuntu Environment
- export names as they are
- Generated binary crashes with "RuntimeError: memory access out of bounds"
- getter macro inconsistent behavior in Release/Debug builds HOT 3
- Uncaught TypeError: Cannot read properties of undefined (reading 'length')
- After extending web_sys with an IDL, when running` cargo doc --all-features --open` I get an erroneous can't find type error
- Automatic deallocation by `FinalizationRegistry` does not work for fully synchronous code HOT 4
- wasm-bindgen is broken and untested at MSRV (1.57) HOT 1
- Missing WebIDL processing features overview HOT 3
- wasm-audio-worklet example gives tons of warnings and some errors
- Expose synchronous XMLHttpRequest HOT 2
- Exports with `#[wasm_bindgen(js_name = default)]` gets exported as `fn _default`
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 wasm-bindgen.