Skip to main content

polymorph_webcrypto_wasmtime/
bindings.rs

1//! Raw `bindgen!` output for the `polymorph:webcrypto` package.
2//!
3//! The crate implements the full package surface — every interface the
4//! `imports` world below names. See [`crate`] for the public API built on
5//! top of these bindings.
6
7#[allow(missing_docs, reason = "generated code")]
8mod generated {
9    wasmtime::component::bindgen!({
10        path: "wit",
11        world: "imports",
12        imports: {
13            // The async WIT functions (key minting, `%export`, `sign`,
14            // `verify`, `seal`, `open`, and every resource drop)
15            // need all three: `async` for the component-model async ABI,
16            // `store` for `Accessor` access to the `ResourceTable` (and the
17            // `…WithStore` traits that host the async methods), and
18            // `trappable` so the host functions can return `wasmtime::Result`
19            // and surface host errors as traps.
20            default: async | store | trappable,
21            // The synchronous WIT functions are bound synchronously (still
22            // `trappable`, but not `async`): the algorithm getters only
23            // touch the `ResourceTable`, which the sync `Host` traits reach
24            // through the `WasiWebcryptoCtxView` data type.
25            "polymorph:webcrypto/mac@0.1.0.[method]mac-key.algorithm-name": trappable,
26            "polymorph:webcrypto/mac@0.1.0.[method]mac-key.algorithm-hash": trappable,
27            "polymorph:webcrypto/mac@0.1.0.[method]mac-key.algorithm-length": trappable,
28            "polymorph:webcrypto/mac@0.1.0.[method]mac-key.extractable": trappable,
29            "polymorph:webcrypto/mac@0.1.0.[method]mac-key.can-sign": trappable,
30            "polymorph:webcrypto/mac@0.1.0.[method]mac-key.can-verify": trappable,
31            "polymorph:webcrypto/mac@0.1.0.[constructor]mac-key-options": trappable,
32            "polymorph:webcrypto/mac@0.1.0.[method]mac-key-options.can-sign": trappable,
33            "polymorph:webcrypto/mac@0.1.0.[method]mac-key-options.can-verify": trappable,
34            "polymorph:webcrypto/mac@0.1.0.[method]mac-key-options.extractable": trappable,
35            "polymorph:webcrypto/aead@0.1.0.[method]aead-key.algorithm-name": trappable,
36            "polymorph:webcrypto/aead@0.1.0.[method]aead-key.algorithm-length": trappable,
37            "polymorph:webcrypto/aead@0.1.0.[method]aead-key.nonce-size": trappable,
38            "polymorph:webcrypto/aead@0.1.0.[method]aead-key.tag-size": trappable,
39            "polymorph:webcrypto/aead@0.1.0.[method]aead-key.extractable": trappable,
40            "polymorph:webcrypto/aead@0.1.0.[method]aead-key.can-seal": trappable,
41            "polymorph:webcrypto/aead@0.1.0.[method]aead-key.can-open": trappable,
42            "polymorph:webcrypto/aead@0.1.0.[method]aead-key.can-wrap": trappable,
43            "polymorph:webcrypto/aead@0.1.0.[method]aead-key.can-unwrap": trappable,
44            "polymorph:webcrypto/aead@0.1.0.[constructor]aead-key-options": trappable,
45            "polymorph:webcrypto/aead@0.1.0.[method]aead-key-options.can-seal": trappable,
46            "polymorph:webcrypto/aead@0.1.0.[method]aead-key-options.can-open": trappable,
47            "polymorph:webcrypto/aead@0.1.0.[method]aead-key-options.can-wrap": trappable,
48            "polymorph:webcrypto/aead@0.1.0.[method]aead-key-options.can-unwrap": trappable,
49            "polymorph:webcrypto/aead@0.1.0.[method]aead-key-options.extractable": trappable,
50            "polymorph:webcrypto/cipher@0.1.0.[method]cipher-key.algorithm-name": trappable,
51            "polymorph:webcrypto/cipher@0.1.0.[method]cipher-key.algorithm-length": trappable,
52            "polymorph:webcrypto/cipher@0.1.0.[method]cipher-key.iv-size": trappable,
53            "polymorph:webcrypto/cipher@0.1.0.[method]cipher-key.extractable": trappable,
54            "polymorph:webcrypto/cipher@0.1.0.[method]cipher-key.can-encrypt": trappable,
55            "polymorph:webcrypto/cipher@0.1.0.[method]cipher-key.can-decrypt": trappable,
56            "polymorph:webcrypto/cipher@0.1.0.[method]cipher-key.can-wrap": trappable,
57            "polymorph:webcrypto/cipher@0.1.0.[method]cipher-key.can-unwrap": trappable,
58            "polymorph:webcrypto/cipher@0.1.0.[constructor]cipher-key-options": trappable,
59            "polymorph:webcrypto/cipher@0.1.0.[method]cipher-key-options.can-encrypt": trappable,
60            "polymorph:webcrypto/cipher@0.1.0.[method]cipher-key-options.can-decrypt": trappable,
61            "polymorph:webcrypto/cipher@0.1.0.[method]cipher-key-options.can-wrap": trappable,
62            "polymorph:webcrypto/cipher@0.1.0.[method]cipher-key-options.can-unwrap": trappable,
63            "polymorph:webcrypto/cipher@0.1.0.[method]cipher-key-options.extractable": trappable,
64            "polymorph:webcrypto/derivation@0.1.0.[constructor]derive-options": trappable,
65            "polymorph:webcrypto/derivation@0.1.0.[method]derive-options.can-derive-bits": trappable,
66            "polymorph:webcrypto/derivation@0.1.0.[method]derive-options.can-derive-key": trappable,
67            "polymorph:webcrypto/derivation@0.1.0.[method]derive-input.can-derive-bits": trappable,
68            "polymorph:webcrypto/derivation@0.1.0.[method]derive-input.can-derive-key": trappable,
69            "polymorph:webcrypto/key-agreement@0.1.0.[constructor]agreement-key-options": trappable,
70            "polymorph:webcrypto/key-agreement@0.1.0.[method]agreement-key-options.can-derive-bits": trappable,
71            "polymorph:webcrypto/key-agreement@0.1.0.[method]agreement-key-options.can-derive-key": trappable,
72            "polymorph:webcrypto/key-agreement@0.1.0.[method]agreement-key-options.extractable": trappable,
73            "polymorph:webcrypto/key-agreement@0.1.0.[method]public-key.algorithm-name": trappable,
74            "polymorph:webcrypto/key-agreement@0.1.0.[method]secret-key.algorithm-name": trappable,
75            "polymorph:webcrypto/key-agreement@0.1.0.[method]secret-key.can-derive-bits": trappable,
76            "polymorph:webcrypto/key-agreement@0.1.0.[method]secret-key.can-derive-key": trappable,
77            "polymorph:webcrypto/key-agreement@0.1.0.[method]secret-key.extractable": trappable,
78            "polymorph:webcrypto/hkdf@0.1.0.[method]ikm.can-derive-bits": trappable,
79            "polymorph:webcrypto/hkdf@0.1.0.[method]ikm.can-derive-key": trappable,
80            "polymorph:webcrypto/pbkdf2@0.1.0.[method]password.can-derive-bits": trappable,
81            "polymorph:webcrypto/pbkdf2@0.1.0.[method]password.can-derive-key": trappable,
82            "polymorph:webcrypto/digest@0.1.0.[method]digest.algorithm-name": trappable,
83            "polymorph:webcrypto/sha2@0.1.0.make-digest": trappable,
84            "polymorph:webcrypto/sha1-checked@0.1.0.make-rejecting-digest": trappable,
85            "polymorph:webcrypto/sha1-checked@0.1.0.make-mitigating-digest": trappable,
86            "polymorph:webcrypto/signature@0.1.0.[method]verifying-key.algorithm-name": trappable,
87            "polymorph:webcrypto/signature@0.1.0.[method]verifying-key.algorithm-curve": trappable,
88            "polymorph:webcrypto/signature@0.1.0.[method]verifying-key.algorithm-hash": trappable,
89            "polymorph:webcrypto/signature@0.1.0.[method]verifying-key.algorithm-length": trappable,
90            "polymorph:webcrypto/signature@0.1.0.[method]verifying-key.algorithm-public-exponent": trappable,
91            "polymorph:webcrypto/signature@0.1.0.[method]signing-key.algorithm-name": trappable,
92            "polymorph:webcrypto/signature@0.1.0.[method]signing-key.algorithm-curve": trappable,
93            "polymorph:webcrypto/signature@0.1.0.[method]signing-key.algorithm-hash": trappable,
94            "polymorph:webcrypto/signature@0.1.0.[method]signing-key.algorithm-length": trappable,
95            "polymorph:webcrypto/signature@0.1.0.[method]signing-key.algorithm-public-exponent": trappable,
96            "polymorph:webcrypto/signature@0.1.0.[method]signing-key.extractable": trappable,
97            "polymorph:webcrypto/signature@0.1.0.[method]signing-key.can-sign": trappable,
98            "polymorph:webcrypto/signature@0.1.0.[constructor]signing-key-options": trappable,
99            "polymorph:webcrypto/signature@0.1.0.[method]signing-key-options.can-sign": trappable,
100            "polymorph:webcrypto/signature@0.1.0.[method]signing-key-options.extractable": trappable,
101            "polymorph:webcrypto/key-wrap@0.1.0.[method]kw-key.algorithm-name": trappable,
102            "polymorph:webcrypto/key-wrap@0.1.0.[method]kw-key.algorithm-length": trappable,
103            "polymorph:webcrypto/key-wrap@0.1.0.[method]kw-key.extractable": trappable,
104            "polymorph:webcrypto/key-wrap@0.1.0.[method]kw-key.can-wrap": trappable,
105            "polymorph:webcrypto/key-wrap@0.1.0.[method]kw-key.can-unwrap": trappable,
106            "polymorph:webcrypto/key-wrap@0.1.0.[constructor]kw-key-options": trappable,
107            "polymorph:webcrypto/key-wrap@0.1.0.[method]kw-key-options.can-wrap": trappable,
108            "polymorph:webcrypto/key-wrap@0.1.0.[method]kw-key-options.can-unwrap": trappable,
109            "polymorph:webcrypto/key-wrap@0.1.0.[method]kw-key-options.extractable": trappable,
110            "polymorph:webcrypto/public-encryption@0.1.0.[constructor]decryption-key-options": trappable,
111            "polymorph:webcrypto/public-encryption@0.1.0.[method]decryption-key-options.can-decrypt": trappable,
112            "polymorph:webcrypto/public-encryption@0.1.0.[method]decryption-key-options.can-unwrap": trappable,
113            "polymorph:webcrypto/public-encryption@0.1.0.[method]decryption-key-options.extractable": trappable,
114            "polymorph:webcrypto/public-encryption@0.1.0.[method]encryption-key.algorithm-name": trappable,
115            "polymorph:webcrypto/public-encryption@0.1.0.[method]encryption-key.algorithm-hash": trappable,
116            "polymorph:webcrypto/public-encryption@0.1.0.[method]encryption-key.algorithm-length": trappable,
117            "polymorph:webcrypto/public-encryption@0.1.0.[method]encryption-key.algorithm-public-exponent": trappable,
118            "polymorph:webcrypto/public-encryption@0.1.0.[method]decryption-key.algorithm-name": trappable,
119            "polymorph:webcrypto/public-encryption@0.1.0.[method]decryption-key.algorithm-hash": trappable,
120            "polymorph:webcrypto/public-encryption@0.1.0.[method]decryption-key.algorithm-length": trappable,
121            "polymorph:webcrypto/public-encryption@0.1.0.[method]decryption-key.algorithm-public-exponent": trappable,
122            "polymorph:webcrypto/public-encryption@0.1.0.[method]decryption-key.can-decrypt": trappable,
123            "polymorph:webcrypto/public-encryption@0.1.0.[method]decryption-key.can-unwrap": trappable,
124            "polymorph:webcrypto/public-encryption@0.1.0.[method]decryption-key.extractable": trappable,
125        },
126        with: {
127            "polymorph:webcrypto/mac.mac-key": crate::MacKey,
128            "polymorph:webcrypto/mac.mac-key-options": crate::MacKeyOptions,
129            "polymorph:webcrypto/derivation.derive-options": crate::DeriveOptions,
130            "polymorph:webcrypto/derivation.derive-input": crate::DeriveInput,
131            "polymorph:webcrypto/wrapping.wrap-input": crate::WrapInput,
132            "polymorph:webcrypto/wrapping.unwrap-input": crate::UnwrapInput,
133            "polymorph:webcrypto/key-wrap.kw-key": crate::KwKey,
134            "polymorph:webcrypto/key-wrap.kw-key-options": crate::KwKeyOptions,
135            "polymorph:webcrypto/hkdf.ikm": crate::Ikm,
136            "polymorph:webcrypto/pbkdf2.password": crate::Password,
137            "polymorph:webcrypto/key-agreement.agreement-key-options": crate::AgreementKeyOptions,
138            "polymorph:webcrypto/key-agreement.public-key": crate::AgreementPublicKey,
139            "polymorph:webcrypto/key-agreement.secret-key": crate::AgreementSecretKey,
140            "polymorph:webcrypto/aead.aead-key-options": crate::AeadKeyOptions,
141            "polymorph:webcrypto/signature.signing-key-options": crate::SigningKeyOptions,
142            "polymorph:webcrypto/aead.aead-key": crate::AeadKey,
143            "polymorph:webcrypto/cipher.cipher-key": crate::CipherKey,
144            "polymorph:webcrypto/cipher.cipher-key-options": crate::CipherKeyOptions,
145            "polymorph:webcrypto/digest.digest": crate::Digest,
146            "polymorph:webcrypto/signature.verifying-key": crate::VerifyingKey,
147            "polymorph:webcrypto/signature.signing-key": crate::SigningKey,
148            "polymorph:webcrypto/public-encryption.encryption-key": crate::EncryptionKey,
149            "polymorph:webcrypto/public-encryption.decryption-key": crate::DecryptionKey,
150            "polymorph:webcrypto/public-encryption.decryption-key-options": crate::DecryptionKeyOptions,
151        },
152    });
153}
154
155pub use self::generated::polymorph::*;