From ee87db9598d5b624ad42d6c5cb499c6943b7d39a Mon Sep 17 00:00:00 2001 From: sksat Date: Thu, 18 Apr 2024 21:22:44 +0900 Subject: [PATCH 1/3] devtools-frontend/crates: set same version to root cargo workspace --- devtools-frontend/crates/Cargo.lock | 2 +- devtools-frontend/crates/Cargo.toml | 5 +++++ devtools-frontend/crates/wasm-opslang/Cargo.toml | 4 +++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/devtools-frontend/crates/Cargo.lock b/devtools-frontend/crates/Cargo.lock index ee105b3e..492c22a4 100644 --- a/devtools-frontend/crates/Cargo.lock +++ b/devtools-frontend/crates/Cargo.lock @@ -394,7 +394,7 @@ dependencies = [ [[package]] name = "wasm-opslang" -version = "0.1.0" +version = "0.7.0-beta.3" dependencies = [ "async-recursion", "chrono", diff --git a/devtools-frontend/crates/Cargo.toml b/devtools-frontend/crates/Cargo.toml index 4e19b7ab..2e008896 100644 --- a/devtools-frontend/crates/Cargo.toml +++ b/devtools-frontend/crates/Cargo.toml @@ -5,6 +5,11 @@ members = [ "wasm-opslang", ] +[workspace.package] +version = "0.7.0-beta.3" +description = "A command and control system for C2A-based satellites" +repository = "https://github.com/arkedge/gaia" + # profile config should be set in workspace root [profile.release] # Tell `rustc` to optimize for small code size. diff --git a/devtools-frontend/crates/wasm-opslang/Cargo.toml b/devtools-frontend/crates/wasm-opslang/Cargo.toml index f95960ed..7ea8b619 100644 --- a/devtools-frontend/crates/wasm-opslang/Cargo.toml +++ b/devtools-frontend/crates/wasm-opslang/Cargo.toml @@ -1,6 +1,8 @@ [package] name = "wasm-opslang" -version = "0.1.0" +version.workspace = true +description.workspace = true +repository.workspace = true edition = "2021" links = "wasm-opslang" From 2d314ab387ddc19899c138985c3b70191979c2b5 Mon Sep 17 00:00:00 2001 From: sksat Date: Thu, 18 Apr 2024 21:23:20 +0900 Subject: [PATCH 2/3] use wasm-opslang 0.7.0-beta.3 --- Cargo.lock | 2 +- devtools-frontend/Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3f39a427..3d525dd0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2674,7 +2674,7 @@ dependencies = [ [[package]] name = "wasm-opslang" -version = "0.1.0" +version = "0.7.0-beta.3" dependencies = [ "async-recursion", "chrono", diff --git a/devtools-frontend/Cargo.toml b/devtools-frontend/Cargo.toml index 33a0af5c..47725fd8 100644 --- a/devtools-frontend/Cargo.toml +++ b/devtools-frontend/Cargo.toml @@ -8,4 +8,4 @@ repository = "https://github.com/arkedge/gaia" [dependencies] rust-embed = { version = "8.0.0", features = ["interpolate-folder-path", "debug-embed"] } -wasm-opslang = { path = "crates/wasm-opslang" } +wasm-opslang = { path = "crates/wasm-opslang", version = "0.7.0-beta.3" } From e0b71e31f7d240d1ff818f038f2257df45bf3fb3 Mon Sep 17 00:00:00 2001 From: sksat Date: Fri, 19 Apr 2024 12:19:20 +0900 Subject: [PATCH 3/3] rename wasm-opslang crate to opslang-wasm --- Cargo.lock | 34 +++++++++---------- devtools-frontend/Cargo.toml | 2 +- devtools-frontend/build.rs | 6 ++-- devtools-frontend/crates/Cargo.lock | 32 ++++++++--------- devtools-frontend/crates/Cargo.toml | 2 +- .../{wasm-opslang => opslang-wasm}/.gitignore | 0 .../{wasm-opslang => opslang-wasm}/Cargo.toml | 4 +-- .../{wasm-opslang => opslang-wasm}/build.rs | 0 .../js/union.js | 0 .../src/free_variables.rs | 0 .../{wasm-opslang => opslang-wasm}/src/lib.rs | 0 .../src/union_value.rs | 0 .../src/util.rs | 0 .../src/value.rs | 0 .../tests/web.rs | 0 devtools-frontend/package.json | 2 +- .../src/components/CommandView.tsx | 2 +- 17 files changed, 42 insertions(+), 42 deletions(-) rename devtools-frontend/crates/{wasm-opslang => opslang-wasm}/.gitignore (100%) rename devtools-frontend/crates/{wasm-opslang => opslang-wasm}/Cargo.toml (94%) rename devtools-frontend/crates/{wasm-opslang => opslang-wasm}/build.rs (100%) rename devtools-frontend/crates/{wasm-opslang => opslang-wasm}/js/union.js (100%) rename devtools-frontend/crates/{wasm-opslang => opslang-wasm}/src/free_variables.rs (100%) rename devtools-frontend/crates/{wasm-opslang => opslang-wasm}/src/lib.rs (100%) rename devtools-frontend/crates/{wasm-opslang => opslang-wasm}/src/union_value.rs (100%) rename devtools-frontend/crates/{wasm-opslang => opslang-wasm}/src/util.rs (100%) rename devtools-frontend/crates/{wasm-opslang => opslang-wasm}/src/value.rs (100%) rename devtools-frontend/crates/{wasm-opslang => opslang-wasm}/tests/web.rs (100%) diff --git a/Cargo.lock b/Cargo.lock index 3d525dd0..8841a7f0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -270,8 +270,8 @@ checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" name = "c2a-devtools-frontend" version = "0.7.0-beta.3" dependencies = [ + "opslang-wasm", "rust-embed", - "wasm-opslang", ] [[package]] @@ -1166,6 +1166,22 @@ dependencies = [ "thiserror", ] +[[package]] +name = "opslang-wasm" +version = "0.7.0-beta.3" +dependencies = [ + "async-recursion", + "chrono", + "console_error_panic_hook", + "opslang-ast", + "opslang-parser", + "regex", + "wasm-bindgen", + "wasm-bindgen-futures", + "wasm-bindgen-test", + "web-sys", +] + [[package]] name = "os_info" version = "3.7.0" @@ -2672,22 +2688,6 @@ dependencies = [ "syn 2.0.39", ] -[[package]] -name = "wasm-opslang" -version = "0.7.0-beta.3" -dependencies = [ - "async-recursion", - "chrono", - "console_error_panic_hook", - "opslang-ast", - "opslang-parser", - "regex", - "wasm-bindgen", - "wasm-bindgen-futures", - "wasm-bindgen-test", - "web-sys", -] - [[package]] name = "web-sys" version = "0.3.65" diff --git a/devtools-frontend/Cargo.toml b/devtools-frontend/Cargo.toml index 47725fd8..da4ee8f0 100644 --- a/devtools-frontend/Cargo.toml +++ b/devtools-frontend/Cargo.toml @@ -8,4 +8,4 @@ repository = "https://github.com/arkedge/gaia" [dependencies] rust-embed = { version = "8.0.0", features = ["interpolate-folder-path", "debug-embed"] } -wasm-opslang = { path = "crates/wasm-opslang", version = "0.7.0-beta.3" } +opslang-wasm = { path = "crates/opslang-wasm", version = "0.7.0-beta.3" } diff --git a/devtools-frontend/build.rs b/devtools-frontend/build.rs index 02aa9b51..73057b32 100644 --- a/devtools-frontend/build.rs +++ b/devtools-frontend/build.rs @@ -33,10 +33,10 @@ fn main() { // parepare crate dir let crate_root_dir = out_dir.join("crate_root"); - // copy wasm-opslang dist + // copy opslang-wasm dist { - let opslang_pkg_dir = env::var("DEP_WASM_OPSLANG_OUT_DIR").unwrap(); - let opslang_dist_dir = crate_root_dir.join("wasm-opslang").join("pkg"); + let opslang_pkg_dir = env::var("DEP_OPSLANG_WASM_OUT_DIR").unwrap(); + let opslang_dist_dir = crate_root_dir.join("opslang-wasm").join("pkg"); copy_devtools_dir(opslang_pkg_dir, opslang_dist_dir).unwrap(); } diff --git a/devtools-frontend/crates/Cargo.lock b/devtools-frontend/crates/Cargo.lock index 492c22a4..7891185a 100644 --- a/devtools-frontend/crates/Cargo.lock +++ b/devtools-frontend/crates/Cargo.lock @@ -184,6 +184,22 @@ dependencies = [ "thiserror", ] +[[package]] +name = "opslang-wasm" +version = "0.7.0-beta.3" +dependencies = [ + "async-recursion", + "chrono", + "console_error_panic_hook", + "opslang-ast", + "opslang-parser", + "regex", + "wasm-bindgen", + "wasm-bindgen-futures", + "wasm-bindgen-test", + "web-sys", +] + [[package]] name = "peg" version = "0.8.2" @@ -392,22 +408,6 @@ dependencies = [ "syn", ] -[[package]] -name = "wasm-opslang" -version = "0.7.0-beta.3" -dependencies = [ - "async-recursion", - "chrono", - "console_error_panic_hook", - "opslang-ast", - "opslang-parser", - "regex", - "wasm-bindgen", - "wasm-bindgen-futures", - "wasm-bindgen-test", - "web-sys", -] - [[package]] name = "web-sys" version = "0.3.69" diff --git a/devtools-frontend/crates/Cargo.toml b/devtools-frontend/crates/Cargo.toml index 2e008896..fb89ad30 100644 --- a/devtools-frontend/crates/Cargo.toml +++ b/devtools-frontend/crates/Cargo.toml @@ -2,7 +2,7 @@ resolver = "2" members = [ - "wasm-opslang", + "opslang-wasm", ] [workspace.package] diff --git a/devtools-frontend/crates/wasm-opslang/.gitignore b/devtools-frontend/crates/opslang-wasm/.gitignore similarity index 100% rename from devtools-frontend/crates/wasm-opslang/.gitignore rename to devtools-frontend/crates/opslang-wasm/.gitignore diff --git a/devtools-frontend/crates/wasm-opslang/Cargo.toml b/devtools-frontend/crates/opslang-wasm/Cargo.toml similarity index 94% rename from devtools-frontend/crates/wasm-opslang/Cargo.toml rename to devtools-frontend/crates/opslang-wasm/Cargo.toml index 7ea8b619..31f37f53 100644 --- a/devtools-frontend/crates/wasm-opslang/Cargo.toml +++ b/devtools-frontend/crates/opslang-wasm/Cargo.toml @@ -1,11 +1,11 @@ [package] -name = "wasm-opslang" +name = "opslang-wasm" version.workspace = true description.workspace = true repository.workspace = true edition = "2021" -links = "wasm-opslang" +links = "opslang-wasm" [lib] crate-type = ["cdylib", "rlib"] diff --git a/devtools-frontend/crates/wasm-opslang/build.rs b/devtools-frontend/crates/opslang-wasm/build.rs similarity index 100% rename from devtools-frontend/crates/wasm-opslang/build.rs rename to devtools-frontend/crates/opslang-wasm/build.rs diff --git a/devtools-frontend/crates/wasm-opslang/js/union.js b/devtools-frontend/crates/opslang-wasm/js/union.js similarity index 100% rename from devtools-frontend/crates/wasm-opslang/js/union.js rename to devtools-frontend/crates/opslang-wasm/js/union.js diff --git a/devtools-frontend/crates/wasm-opslang/src/free_variables.rs b/devtools-frontend/crates/opslang-wasm/src/free_variables.rs similarity index 100% rename from devtools-frontend/crates/wasm-opslang/src/free_variables.rs rename to devtools-frontend/crates/opslang-wasm/src/free_variables.rs diff --git a/devtools-frontend/crates/wasm-opslang/src/lib.rs b/devtools-frontend/crates/opslang-wasm/src/lib.rs similarity index 100% rename from devtools-frontend/crates/wasm-opslang/src/lib.rs rename to devtools-frontend/crates/opslang-wasm/src/lib.rs diff --git a/devtools-frontend/crates/wasm-opslang/src/union_value.rs b/devtools-frontend/crates/opslang-wasm/src/union_value.rs similarity index 100% rename from devtools-frontend/crates/wasm-opslang/src/union_value.rs rename to devtools-frontend/crates/opslang-wasm/src/union_value.rs diff --git a/devtools-frontend/crates/wasm-opslang/src/util.rs b/devtools-frontend/crates/opslang-wasm/src/util.rs similarity index 100% rename from devtools-frontend/crates/wasm-opslang/src/util.rs rename to devtools-frontend/crates/opslang-wasm/src/util.rs diff --git a/devtools-frontend/crates/wasm-opslang/src/value.rs b/devtools-frontend/crates/opslang-wasm/src/value.rs similarity index 100% rename from devtools-frontend/crates/wasm-opslang/src/value.rs rename to devtools-frontend/crates/opslang-wasm/src/value.rs diff --git a/devtools-frontend/crates/wasm-opslang/tests/web.rs b/devtools-frontend/crates/opslang-wasm/tests/web.rs similarity index 100% rename from devtools-frontend/crates/wasm-opslang/tests/web.rs rename to devtools-frontend/crates/opslang-wasm/tests/web.rs diff --git a/devtools-frontend/package.json b/devtools-frontend/package.json index 540578e0..82292d83 100644 --- a/devtools-frontend/package.json +++ b/devtools-frontend/package.json @@ -10,7 +10,7 @@ "crate:build": "cd crates && wasm-pack build --weak-refs --target web --release", "crate:dev": "cd crates && cargo watch -s 'wasm-pack build --weak-refs --target web --dev' -C", "crate": "pnpm run crate:${MODE:-build}", - "crates:wasm-opslang": "pnpm run crate wasm-opslang", + "crates:opslang-wasm": "pnpm run crate opslang-wasm", "dev:crates": "MODE=dev run-p crates:*", "dev:vite": "vite --host", "dev": "run-p dev:*", diff --git a/devtools-frontend/src/components/CommandView.tsx b/devtools-frontend/src/components/CommandView.tsx index aee68de4..773bf8eb 100644 --- a/devtools-frontend/src/components/CommandView.tsx +++ b/devtools-frontend/src/components/CommandView.tsx @@ -10,7 +10,7 @@ import { import { Tco, TcoParam, TmivField } from "../proto/tco_tmiv"; import { useClient } from "./Layout"; import { GrpcClientService } from "../worker"; -import initOpslang, * as opslang from "@crate/wasm-opslang/pkg"; +import initOpslang, * as opslang from "@crate/opslang-wasm/pkg"; type ParameterValue = | { type: "bytes"; bytes: Uint8Array; bigint: bigint }