Skip to content

Commit

Permalink
chore: bump wasmbuild
Browse files Browse the repository at this point in the history
  • Loading branch information
oplik0 committed Mar 3, 2024
1 parent ae7b0e5 commit a72fc09
Show file tree
Hide file tree
Showing 5 changed files with 696 additions and 579 deletions.
6 changes: 2 additions & 4 deletions deno.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,13 @@
},
"$schema": "https://deno.land/x/deno/cli/schemas/config-file.v1.json",
"lint": {
"files": {
"exclude": [
"exclude": [
"lib/_wasm/wasm.js",
"lib/_wasm/out/"
]
}
},
"tasks": {
"wasmbuild": "deno run --allow-env --allow-run --allow-read --allow-write --allow-net https://deno.land/x/wasmbuild@0.15.4/main.ts --out ./lib/_wasm --project scrypt-wasm --sync"
"wasmbuild": "deno run --allow-env --allow-run --allow-read --allow-write --allow-net jsr:@deno/wasmbuild@0.16.0 --out ./lib/_wasm --project scrypt-wasm --sync"
},
"fmt": {
"exclude": [
Expand Down
51 changes: 50 additions & 1 deletion deno.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 3 additions & 4 deletions lib/_wasm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,13 @@ crate-type = ["cdylib", "rlib"]
[dependencies]
getrandom = { version = "0.2", features = ["js"] }
scrypt = { version = "0.11", default-features = false }
talc = { version = "3", default-features = false, features = ["lock_api"] }
wasm-bindgen = { version = "=0.2.89", default-features = false, features = ["spans"] }
talc = { version = "4.3.1", default-features = false, features = ["lock_api"] }
wasm-bindgen = { version = "=0.2.91", default-features = false, features = ["spans"] }

[dev-dependencies]
wasm-bindgen-test = "=0.3.39"
wasm-bindgen-test = "=0.3.41"

[profile.release]
# Tell `rustc` to optimize for small code size.
opt-level = 3

[features]
Expand Down
34 changes: 34 additions & 0 deletions lib/_wasm/scrypt_wasm.generated.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
// deno-lint-ignore-file
// deno-fmt-ignore-file

export interface InstantiateResult {
instance: WebAssembly.Instance;
exports: {
scrypt_hash: typeof scrypt_hash
};
}

/** Gets if the Wasm module has been instantiated. */
export function isInstantiated(): boolean;


/** Instantiates an instance of the Wasm module returning its functions.
* @remarks It is safe to call this multiple times and once successfully
* loaded it will always return a reference to the same object. */
export function instantiate(): InstantiateResult["exports"];

/** Instantiates an instance of the Wasm module along with its exports.
* @remarks It is safe to call this multiple times and once successfully
* loaded it will always return a reference to the same object. */
export function instantiateWithInstance(): InstantiateResult;

/**
* @param {Uint8Array} password
* @param {Uint8Array} salt
* @param {number} n
* @param {number} r
* @param {number} p
* @param {number} dklen
* @returns {Uint8Array}
*/
export function scrypt_hash(password: Uint8Array, salt: Uint8Array, n: number, r: number, p: number, dklen: number): Uint8Array;
Loading

0 comments on commit a72fc09

Please sign in to comment.