Skip to content

Commit

Permalink
Merge pull request #129 from arkedge/prepare-package-wasm-crates
Browse files Browse the repository at this point in the history
Prepare package wasm crates
  • Loading branch information
KOBA789 authored Apr 19, 2024
2 parents 7bf96f9 + e0b71e3 commit c844a32
Show file tree
Hide file tree
Showing 17 changed files with 50 additions and 43 deletions.
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 {
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

0 comments on commit c844a32

Please sign in to comment.