-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactored wasm and rust workspace, and added jsonpath
- Loading branch information
1 parent
fae197d
commit d1a3e17
Showing
31 changed files
with
23,587 additions
and
2,957 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,4 +10,4 @@ html_cov/ | |
cov.lcov | ||
coverage/ | ||
docs/ | ||
crypto/hash/_wasm/target | ||
_wasm/target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
{ | ||
"deno.enable": true, | ||
"deno.unstable": true, | ||
"editor.defaultFormatter": "denoland.vscode-deno" | ||
"deno.unstable": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
import { parse } from "@std/toml"; | ||
import { resolve } from "@std/path"; | ||
|
||
const isCheck = Deno.args.some((a) => a === "--check"); | ||
const failFast = Deno.args.some((a) => a === "--fail-fast"); | ||
|
||
const rawCargo = Deno.readTextFileSync("./_wasm/Cargo.toml"); | ||
|
||
const parsedCargo = parse(rawCargo) as { workspace: { members: string[] } }; | ||
|
||
let didFail = false; | ||
|
||
for (const member of parsedCargo.workspace.members) { | ||
const [folder] = member.split("_"); | ||
const outPath = resolve( | ||
folder, | ||
"_wasm", | ||
); | ||
|
||
const args: string[] = [ | ||
"run", | ||
"-A", | ||
"jsr:@deno/wasmbuild@0.17.1", | ||
"--js-ext", | ||
"mjs", | ||
"--sync", | ||
"--project", | ||
member, | ||
"--out", | ||
outPath, | ||
]; | ||
|
||
if (isCheck) { | ||
args.push("--check"); | ||
} | ||
|
||
const command = new Deno.Command(Deno.execPath(), { | ||
args: args, | ||
cwd: "./_wasm", | ||
}); | ||
const child = command.spawn(); | ||
const status = await child.status; | ||
if (!status.success) { | ||
didFail = true; | ||
} | ||
if (failFast && didFail) { | ||
Deno.exit(1); | ||
} | ||
} | ||
|
||
Deno.exit(didFail ? 1 : 0); |
File renamed without changes.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
crypto/hash/_wasm/argon2/Cargo.toml → _wasm/crypto_hash_argon2/Cargo.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
crypto/hash/_wasm/bcrypt/Cargo.toml → _wasm/crypto_hash_bcrypt/Cargo.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
crypto/hash/_wasm/scrypt/Cargo.toml → _wasm/crypto_hash_scrypt/Cargo.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
Oops, something went wrong.