Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prepare package wasm crates #129

Merged
merged 3 commits into from
Apr 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 17 additions & 17 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion devtools-frontend/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
opslang-wasm = { path = "crates/opslang-wasm", version = "0.7.0-beta.3" }
6 changes: 3 additions & 3 deletions devtools-frontend/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down
32 changes: 16 additions & 16 deletions devtools-frontend/crates/Cargo.lock

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

7 changes: 6 additions & 1 deletion devtools-frontend/crates/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,14 @@
resolver = "2"

members = [
"wasm-opslang",
"opslang-wasm",
]

[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.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
[package]
name = "wasm-opslang"
version = "0.1.0"
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"]
Expand Down
2 changes: 1 addition & 1 deletion devtools-frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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:*",
Expand Down
2 changes: 1 addition & 1 deletion devtools-frontend/src/components/CommandView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
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 }
Expand Down Expand Up @@ -447,7 +447,7 @@
monaco.editor.setModelMarkers(model, "owner", markers);
return markers;
},
[commandComponents, commandPrefixes],

Check warning on line 450 in devtools-frontend/src/components/CommandView.tsx

View workflow job for this annotation

GitHub Actions / devtools

React Hook useCallback has unnecessary dependencies: 'commandComponents' and 'commandPrefixes'. Either exclude them or remove the dependency array
);

const handleEditorDidMount = useCallback(
Expand Down
Loading