Skip to content

Commit

Permalink
Updated wasm and tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
halvardssm committed Oct 14, 2024
1 parent a578605 commit 12d39f7
Show file tree
Hide file tree
Showing 9 changed files with 5,957 additions and 6,145 deletions.
25 changes: 12 additions & 13 deletions crypto/deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,16 @@
"./utils": "./utils.ts"
},
"tasks": {
"build": "deno task build:argon2 && deno task build:bcrypt && deno task build:scrypt",
"build:check": "deno task build:argon2:check && deno task build:bcrypt:check && deno task build:scrypt:check",
"build:wasm": "deno task --cwd hash/_wasm wasmbuild --js-ext mjs --sync",
"build:argon2": "deno task build:wasm --project deno_stdext_crypto_hash_wasm_argon2",
"build:argon2:check": "deno task build:argon2 --check",
"build:bcrypt": "deno task build:wasm --project deno_stdext_crypto_hash_wasm_bcrypt",
"build:bcrypt:check": "deno task build:bcrypt --check",
"build:scrypt": "deno task build:wasm --project deno_stdext_crypto_hash_wasm_scrypt",
"build:scrypt:check": "deno task build:scrypt --check",
"wasmbuild": "deno run -A jsr:@deno/wasmbuild@0.17.1",
"format": "cd hash/_wasm && cargo fmt --all",
"format:check": "cd hash/_wasm && cargo fmt --all -- --check"
}
"wasmbuild": "deno run -A jsr:@deno/wasmbuild@0.17.1 --js-ext mjs --sync",
"format:wasm": "cd hash/_wasm && cargo fmt --all",
"format:wasm:check": "cd hash/_wasm && cargo fmt --all -- --check",
"echo:wasm_projects": "deno eval 'import(\"./deno.json\", {with:{type:\"json\"}}).then((mod)=>console.info(mod.default.wasm_projects.join(\" \")))'",
"build:wasm": "sh -c 'for p in $(deno task echo:wasm_projects); do deno task --cwd hash/_wasm wasmbuild --project $p; done'",
"build:wasm:check": "sh -c 'for p in $(deno task echo:wasm_projects); do deno task --cwd hash/_wasm wasmbuild --project $p --check; done'"
},
"wasm_projects": [
"deno_stdext_crypto_hash_wasm_argon2",
"deno_stdext_crypto_hash_wasm_bcrypt",
"deno_stdext_crypto_hash_wasm_scrypt"
]
}
15 changes: 15 additions & 0 deletions crypto/hash/_wasm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,21 @@ members = [
"scrypt"
]

[workspace.package]
version = "0.0.0"
edition = "2021"

[workspace.dependencies]
wasm-bindgen = "0.2.92"
serde = { version = "1", features = ["derive"] }
serde-wasm-bindgen = "0.4"
getrandom = { version = "0.2", features = ["js"] }
rand_core = { version = "0.6", features = ["std"] }
js-sys = "0.3"
argon2 = "0.5"
bcrypt = "0.15"
scrypt = "0.11"

[profile.release]
codegen-units = 1
incremental = true
Expand Down
20 changes: 10 additions & 10 deletions crypto/hash/_wasm/argon2/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
[package]
name = "deno_stdext_crypto_hash_wasm_argon2"
version = "0.0.0"
edition = "2021"
version.workspace = true
edition.workspace = true

[lib]
crate_type = ["cdylib"]
crate-type = ["cdylib"]

[dependencies]
wasm-bindgen = "=0.2.92"
serde = { version = "1", features = ["derive"] }
serde-wasm-bindgen = "0.4"
getrandom = { version = "0.2", features = ["js"] }
argon2 = "0.5"
rand_core = { version = "0.6", features = ["std"] }
js-sys = "0.3"
wasm-bindgen.workspace = true
serde.workspace = true
serde-wasm-bindgen.workspace = true
getrandom.workspace = true
argon2.workspace = true
rand_core.workspace = true
js-sys.workspace = true
16 changes: 8 additions & 8 deletions crypto/hash/_wasm/bcrypt/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
[package]
name = "deno_stdext_crypto_hash_wasm_bcrypt"
version = "0.0.0"
edition = "2021"
version.workspace = true
edition.workspace = true

[lib]
crate_type = ["cdylib"]
crate-type = ["cdylib"]

[dependencies]
wasm-bindgen = "=0.2.92"
serde = { version = "1", features = ["derive"] }
serde-wasm-bindgen = "0.4"
getrandom = { version = "0.2", features = ["js"] }
bcrypt = "0.15"
wasm-bindgen.workspace = true
serde.workspace = true
serde-wasm-bindgen.workspace = true
getrandom.workspace = true
bcrypt.workspace = true
4,412 changes: 2,177 additions & 2,235 deletions crypto/hash/_wasm/lib/deno_stdext_crypto_hash_wasm_argon2.generated.mjs

Large diffs are not rendered by default.

3,411 changes: 1,654 additions & 1,757 deletions crypto/hash/_wasm/lib/deno_stdext_crypto_hash_wasm_bcrypt.generated.mjs

Large diffs are not rendered by default.

4,167 changes: 2,061 additions & 2,106 deletions crypto/hash/_wasm/lib/deno_stdext_crypto_hash_wasm_scrypt.generated.mjs

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions crypto/hash/_wasm/scrypt/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
[package]
name = "deno_stdext_crypto_hash_wasm_scrypt"
version = "0.0.0"
edition = "2021"
version.workspace = true
edition.workspace = true

[lib]
crate_type = ["cdylib"]
crate-type = ["cdylib"]

[dependencies]
wasm-bindgen = "=0.2.92"
serde = { version = "1", features = ["derive"] }
serde-wasm-bindgen = "0.4"
getrandom = { version = "0.2", features = ["js"] }
scrypt = { version = "0.11" }
wasm-bindgen.workspace = true
serde.workspace = true
serde-wasm-bindgen.workspace = true
getrandom.workspace = true
scrypt.workspace = true
20 changes: 12 additions & 8 deletions deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@
"@stdext/types": "jsr:@stdext/types"
},
"tasks": {
"bump_version": "deno run --allow-env=VERSION --allow-read=. --allow-write=. ./_tools/bump_version.ts",
"check": "deno task format:check && deno lint && deno check **/*.ts",
"test": "RUST_BACKTRACE=1 deno test --unstable-http --unstable-webgpu --allow-all --parallel --coverage --trace-leaks",
"cov:gen": "deno coverage coverage --lcov --output=cov.lcov",
"build": "deno task build:wasm",
"build:check": "deno task build:wasm:check",
"build:wasm": "deno task --cwd crypto build",
"build:wasm:check": "deno task --cwd crypto build:check",
"format": "deno fmt && deno task --cwd crypto format",
"format:check": "deno fmt --check && deno task --cwd crypto format:check"
"build:wasm": "sh -c 'for p in $(deno task echo:wasm_paths); do cd $p && deno task build:wasm; done'",
"build:wasm:check": "sh -c 'for p in $(deno task echo:wasm_paths); do cd $p && deno task build:wasm:check; done'",
"format:wasm": "sh -c 'for p in $(deno task echo:wasm_paths); do cd $p && deno task format:wasm; done'",
"format:wasm:check": "sh -c 'for p in $(deno task echo:wasm_paths); do cd $p && deno task format:wasm:check; done'",
"format": "deno fmt && deno task format:wasm",
"format:check": "deno fmt --check && deno task format:wasm:check",
"echo:wasm_paths": "deno eval 'import(\"./deno.json\", {with:{type:\"json\"}}).then((mod)=>console.info(mod.default.wasm_paths.join(\" \")))'"
},
"workspace": [
"./assert",
Expand All @@ -34,7 +34,11 @@
"./lexer",
"./types"
],
"wasm_paths": [
"./crypto"
],
"exclude": [
"./crypto/hash/_wasm/target"
"./crypto/hash/_wasm/target",
"./coverage"
]
}

0 comments on commit 12d39f7

Please sign in to comment.