Skip to content

Commit 6cba415

Browse files
committed
feat: Finished
1 parent db9d933 commit 6cba415

20 files changed

Lines changed: 80 additions & 72 deletions

File tree

.vscode/settings.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,5 @@
22
"nixEnvPicker.envFile": "${workspaceFolder}${/}flake.nix",
33
"nixEnvPicker.terminalAutoActivate": true,
44
"nixEnvPicker.terminalActivateCommand": "nix develop",
5-
"rust-analyzer.cargo.features": [
6-
"wasm-plugins"
7-
],
5+
"rust-analyzer.cargo.features": "all"
86
}

Makefile

Lines changed: 21 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.PHONY: run run-controller build build-controller build-wrapper build-plugins clean fix
1+
.PHONY: run run-controller build build-host build-plugins clean fix
22

33
# Configuration
44
WASM_RUSTFLAGS = -Z wasi-exec-model=reactor
@@ -15,17 +15,15 @@ CLI_ARGS = "--debug"
1515

1616
# OS detection
1717
ifeq ($(OS),Windows_NT)
18-
RM = cmd /C del /S /Q
19-
MKDIR = mkdir
20-
CP = xcopy /E /I /Y
21-
SEP = &
22-
SETENV = set
18+
RM = cmd /C del /S /Q
19+
MKDIR = mkdir
20+
CP = xcopy /E /I /Y
21+
SEP = &
2322
else
24-
RM = rm -rf
25-
MKDIR = mkdir -p
26-
CP = cp -r
27-
SEP = ;
28-
SETENV = export
23+
RM = rm -rf
24+
MKDIR = mkdir -p
25+
CP = cp -r
26+
SEP = ;
2927
endif
3028

3129
# Targets
@@ -41,8 +39,9 @@ fix:
4139
cargo clippy --fix --allow-dirty --allow-staged --all-features
4240
cargo fmt
4341

44-
## Build target
45-
build: build-controller build-cli build-wrapper build-plugins
42+
## Build target (Uses -j2 to run host and wasm builds simultaneously)
43+
build:
44+
$(MAKE) -j2 build-host build-plugins
4645

4746
## Run target
4847
run: run-controller
@@ -55,24 +54,17 @@ run-controller:
5554
run-cli:
5655
$(MKDIR) $(RUN_DIR) $(SEP) cd $(RUN_DIR) $(SEP) cargo run -p cli --all-features -- $(CLI_ARGS)
5756

58-
## Build controller target
59-
build-controller:
60-
cargo build -p controller --all-features --release
57+
## Build host binaries (controller, cli, wrapper) together
58+
build-host:
59+
cargo build -p controller -p cli -p wrapper --all-features --release
6160

62-
## Build cli target
63-
build-cli:
64-
cargo build -p cli --all-features --release
65-
66-
## Build wrapper target
67-
build-wrapper:
68-
cargo build -p wrapper --all-features --release
69-
70-
## Build plugins target
61+
## Build plugins together
7162
build-plugins:
72-
$(SETENV) RUSTFLAGS="$(WASM_RUSTFLAGS)"
73-
cargo build -p pelican --target $(WASM_TARGET) --release
74-
cargo build -p local --target $(WASM_TARGET) --release
75-
cargo build -p cloudflare --target $(WASM_TARGET) --release
63+
ifeq ($(OS),Windows_NT)
64+
set "RUSTFLAGS=$(WASM_RUSTFLAGS)" && cargo build -p pelican -p local -p cloudflare --target $(WASM_TARGET) --release
65+
else
66+
RUSTFLAGS="$(WASM_RUSTFLAGS)" cargo build -p pelican -p local -p cloudflare --target $(WASM_TARGET) --release
67+
endif
7668

7769
# Create plugin directory if it doesn't exist
7870
$(PLUGIN_DIR):

cli/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ edition = "2024"
88
common = { path = "../common" }
99

1010
# Terminal
11-
crossterm = { version = "0.28.1", features = ["event-stream"] }
11+
crossterm = { version = "0.29.0", features = ["event-stream"] }
1212
ratatui = { version = "0.30.0", features = ["unstable-rendered-line-info"] }
13-
tui-textarea = "0.7.0"
13+
ratatui-textarea = "0.8.0"
1414
ansi-parser = "0.9.1"
1515
ansi-to-tui = "8.0.1"
1616

cli/src/application/util/area.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,12 @@ use std::{error::Error, str::FromStr};
22

33
use color_eyre::eyre::{Result, eyre};
44
use ratatui::{
5-
buffer::Buffer, layout::{Constraint, Flex, Layout, Rect}, style::Style, widgets::{Block, Borders, Paragraph, Widget}
5+
buffer::Buffer,
6+
layout::{Constraint, Flex, Layout, Rect},
7+
style::{Style, Stylize},
8+
widgets::{Block, Borders, Paragraph, Widget},
69
};
7-
use tui_textarea::{Input, TextArea};
10+
use ratatui_textarea::{Input, TextArea};
811

912
use super::{ERROR_COLOR, ERROR_SELECTED_COLOR, OK_COLOR, OK_SELECTED_COLOR};
1013

cli/src/application/util/center.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ impl CenterWarning {
2020
.centered()
2121
.render(area, buffer);
2222
}
23-
}
23+
}

cli/src/application/util/list.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use ratatui::{
66
style::{Style, Stylize},
77
widgets::{HighlightSpacing, List, ListItem, ListState, Paragraph, StatefulWidget, Widget},
88
};
9-
use tui_textarea::{Input, Key, TextArea};
9+
use ratatui_textarea::{Input, Key, TextArea};
1010

1111
use super::{ALT_ROW_BG_COLOR, NORMAL_ROW_BG, SELECTED_STYLE};
1212

cli/src/application/window/connect/tab/server/screen.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ use ratatui::{
1717
Paragraph, Scrollbar, ScrollbarOrientation, ScrollbarState, StatefulWidget, Widget, Wrap,
1818
},
1919
};
20+
use ratatui_textarea::TextArea;
2021
use tonic::{Streaming, async_trait};
21-
use tui_textarea::TextArea;
2222

2323
use crate::application::{
2424
State,

clients/wrapper/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ ctrlc = "3.5.2"
2020
uuid = { version = "1.22.0", features = ["v4"] }
2121

2222
# Command line arguments
23-
clap = { version = "4.5.60", features = ["derive"] }
23+
clap = { version = "4.6.0", features = ["derive"] }
2424

2525
# Regex parsing
2626
regex = "1.12.3"

common/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ colored = "3.1.1"
1212
anyhow = "1.0.102"
1313

1414
# Command line arguments
15-
clap = { version = "4.5.60", features = ["derive"] }
15+
clap = { version = "4.6.0", features = ["derive"] }
1616

1717
# Configuration
1818
serde = { version = "1.0.228", features = ["derive"] }

controller/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ ctrlc = "3.5.2"
2424
uuid = { version = "1.22.0", features = ["v4"] }
2525

2626
# Command line arguments
27-
clap = { version = "4.5.60", features = ["derive"] }
27+
clap = { version = "4.6.0", features = ["derive"] }
2828

2929
# Regex parsing
3030
regex = "1.12.3"

0 commit comments

Comments
 (0)