Skip to content

Commit

Permalink
transport: add WebSocket for the web
Browse files Browse the repository at this point in the history
  • Loading branch information
surban committed Jan 23, 2025
1 parent 5caadd6 commit 40dd11d
Show file tree
Hide file tree
Showing 16 changed files with 1,169 additions and 11 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,13 @@ jobs:
- name: Install dependencies
run: sudo apt-get update && sudo apt install libdbus-1-dev pkg-config
- name: Install latest stable Rust
run: rustup set profile default && rustup default stable && rustup update
run: rustup set profile default && rustup default stable && rustup update && rustup target add wasm32-unknown-unknown
- name: Check code formatting
run: cargo fmt -- --check
- name: Build
run: cargo build --features bluer,usb-device,usb-host,raw-speed-cli,dump --all-targets --quiet
- name: Build WebAssembly
run: cd aggligator-transport-websocket-web && cargo build --quiet
- name: Build documentation
run: cargo doc --no-deps --quiet
- name: Code analysis
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/target
/aggligator-transport-websocket-web/target
/TODO
/*.dump
16 changes: 11 additions & 5 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"files.exclude": {
"target/": true
"target/": true,
"aggligator-transport-websocket-web/target/": true,
},
"cSpell.words": [
"Aggligator",
Expand All @@ -15,16 +16,21 @@
"rust-analyzer.cargo.extraEnv": {
"RUSTUP_TOOLCHAIN": "nightly"
},

// for native:
"rust-analyzer.cargo.features": [
"bluer",
"usb-host",
"usb-device",
],

// for WebAssembly:
// "rust-analyzer.cargo.target": "wasm32-unknown-unknown",
// "rust-analyzer.linkedProjects": [
// "aggligator/Cargo.toml",
// "aggligator-transport-websocket-web/Cargo.toml"
// ],
// "rust-analyzer.cargo.features": [
// "js",
// ],
// "rust-analyzer.cargo.target": "wasm32-unknown-unknown",
// "rust-analyzer.linkedProjects": [
// "aggligator/Cargo.toml"
// ]
}
2 changes: 1 addition & 1 deletion Cargo.lock

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

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ members = [
"aggligator-util",
"aggligator-wrapper-tls",
]
exclude = ["aggligator-transport-websocket-web"]
resolver = "2"

[workspace.package]
Expand Down
2 changes: 2 additions & 0 deletions aggligator-transport-websocket-web/.cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[build]
target = "wasm32-unknown-unknown"
Loading

0 comments on commit 40dd11d

Please sign in to comment.