diff --git a/Cargo.lock b/Cargo.lock index cfffe3f7..23e45c9c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -219,6 +219,9 @@ name = "bs58" version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bf88ba1141d185c399bee5288d850d63b8369520c1eafc32a0430b5b6c287bf4" +dependencies = [ + "tinyvec", +] [[package]] name = "bumpalo" @@ -347,9 +350,8 @@ dependencies = [ [[package]] name = "datex-core" -version = "0.0.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6324622757bf96a6facaf4a9c1c5b42a90878afe431bf02d1a8710ea95bacced" +version = "0.0.10" +source = "git+https://github.com/unyt-org/datex?branch=release%2F0.0.10#0512024d5eabadca4b7dfcffc6b270bf30e4d48e" dependencies = [ "ariadne", "async-select", @@ -402,18 +404,16 @@ dependencies = [ [[package]] name = "datex-crypto-facade" -version = "0.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8871b51b760cdf5a7c3fd2f4244391eda4a4a43e6fadd65d9651bac731934a0" +version = "0.0.2" +source = "git+https://github.com/unyt-org/datex?branch=release%2F0.0.10#0512024d5eabadca4b7dfcffc6b270bf30e4d48e" dependencies = [ "bs58", ] [[package]] name = "datex-crypto-web" -version = "0.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc433cd04b23788f3fddbe9997c27252361cabcfbae50710a4a71b2ca9b09489" +version = "0.0.2" +source = "git+https://github.com/unyt-org/datex?branch=release%2F0.0.10#0512024d5eabadca4b7dfcffc6b270bf30e4d48e" dependencies = [ "datex-crypto-facade", "wasm-bindgen", @@ -424,8 +424,7 @@ dependencies = [ [[package]] name = "datex-macros-internal" version = "0.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6717768303603f37c8d6fd393ae7da7b78ae33b1ad0d6980253fa19005d0b84" +source = "git+https://github.com/unyt-org/datex?branch=release%2F0.0.10#0512024d5eabadca4b7dfcffc6b270bf30e4d48e" dependencies = [ "proc-macro2", "quote", @@ -1244,18 +1243,18 @@ checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" [[package]] name = "pin-project" -version = "1.1.10" +version = "1.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677f1add503faace112b9f1373e43e9e054bfdd22ff1a63c1bc485eaec6a6a8a" +checksum = "f1749c7ed4bcaf4c3d0a3efc28538844fb29bcdd7d2b67b2be7e20ba861ff517" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.10" +version = "1.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e918e4ff8c4549eb882f14b3a4bc8c8bc93de829416eacf579f1207a8fbf861" +checksum = "d9b20ed30f105399776b9c883e68e536ef602a16ae6f596d2c473591d6ad64c6" dependencies = [ "proc-macro2", "quote", @@ -1264,9 +1263,9 @@ dependencies = [ [[package]] name = "pin-project-lite" -version = "0.2.16" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" +checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd" [[package]] name = "plist" @@ -1881,6 +1880,21 @@ dependencies = [ "zerovec", ] +[[package]] +name = "tinyvec" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa5fdc3bce6191a1dbc8c02d5c8bffcf557bafa17c124c5264a458f1b0613fa" +dependencies = [ + "tinyvec_macros", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" + [[package]] name = "toml_datetime" version = "0.7.5+spec-1.1.0" @@ -2375,3 +2389,11 @@ name = "zmij" version = "1.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b8848ee67ecc8aedbaf3e4122217aff892639231befc6a1b58d29fff4c2cabaa" + +[[patch.unused]] +name = "datex-core" +version = "0.0.10" + +[[patch.unused]] +name = "datex-crypto-facade" +version = "0.0.2" diff --git a/README.md b/README.md index c2f0629a..6975041b 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# DATEX Web +# DATEX > Check out our specification at [datex.unyt.org](https://datex.unyt.org). diff --git a/rs-lib/Cargo.toml b/rs-lib/Cargo.toml index d61ce267..bb28a011 100644 --- a/rs-lib/Cargo.toml +++ b/rs-lib/Cargo.toml @@ -20,14 +20,14 @@ panic = "abort" [dependencies] log = { version = "0.4", features = ["std", "serde"] } -datex-core = { version = "0.0.9", default-features = false, features = [ +datex-core = { git = "https://github.com/unyt-org/datex", branch = "release/0.0.10", version = "0.0.10", default-features = false, features = [ "target_wasm", "compiler", "decompiler", "syntax_highlighting_legacy", "lsp_wasm", ] } -datex-crypto-facade = { version = "0.0.1" } +datex-crypto-facade = { git = "https://github.com/unyt-org/datex", branch = "release/0.0.10", version = "0.0.2" } # datex_macros = { git = "https://github.com/unyt-org/datex", branch = "refactor/update-loop", version = "0.1.3", package = "datex_macros" } diff --git a/rs-lib/src/runtime.rs b/rs-lib/src/runtime.rs index 0f6c5c0e..5b62ec58 100644 --- a/rs-lib/src/runtime.rs +++ b/rs-lib/src/runtime.rs @@ -112,12 +112,12 @@ impl JSRuntime { future_to_promise(async move { let something = b"yellow submarineyellow submarine".to_owned(); let some_check = - b"9At2nzU19GjL8F4WFRyB7RZSGLemMGUMVBZAMChfndF2".to_owned(); + "9At2nzU19GjL8F4WFRyB7RZSGLemMGUMVBZAMChfndF2".to_owned(); - let based = CryptoImpl::enc_b58(&something).unwrap(); - let unbased = CryptoImpl::dec_b58(&some_check).unwrap(); + let based = CryptoImpl::enc_b58(&something).as_bytes().to_vec(); + let unbased = CryptoImpl::dec_b58_32(&some_check).unwrap(); assert_eq!(something, unbased); - assert_eq!(some_check, based); + assert_eq!(some_check.as_bytes().to_vec(), based); // Hashes let mut ikm = Vec::from([0u8; 32]); @@ -224,12 +224,14 @@ impl JSRuntime { assert_ne!(msg, ctr_ciphered); // AES key wrapping - let wrapped = CryptoImpl::key_upwrap(&random_bytes, &random_bytes) - .await - .unwrap(); - let unwrapped = CryptoImpl::key_unwrap(&random_bytes, &wrapped) - .await - .unwrap(); + let wrapped = + CryptoImpl::key_wrap_rfc3394(&random_bytes, &random_bytes) + .await + .unwrap(); + let unwrapped = + CryptoImpl::key_unwrap_rfc3394(&random_bytes, &wrapped) + .await + .unwrap(); assert_eq!(random_bytes.to_vec(), unwrapped); // assert_ne!(wrapped, unwrapped); diff --git a/scripts/build-wasm.ts b/scripts/build-wasm.ts index eb8f99dd..a1a4f99b 100644 --- a/scripts/build-wasm.ts +++ b/scripts/build-wasm.ts @@ -105,7 +105,7 @@ async function runWasmBindgen(args: { }) { // make sure wasm-bindgen cli is installed const wasmBindgenInstallProcess = new Deno.Command("cargo", { - args: ["install", "wasm-bindgen-cli"], + args: ["install", "wasm-bindgen-cli", "--version", "0.2.112"], }).spawn(); const installRes = await wasmBindgenInstallProcess.status; if (!installRes.success) {