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

Rename xwt-web-sys to xwt-web #164

Merged
merged 1 commit into from
Sep 13, 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
2 changes: 1 addition & 1 deletion .github/scripts/build_env/ubuntu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd)
get_wasm_bindgen_version() {
cargo metadata \
--format-version 1 \
--manifest-path crates/xwt-web-sys/Cargo.toml \
--manifest-path crates/xwt-web/Cargo.toml \
--filter-platform wasm32-unknown-unknown \
--quiet |
jq -r \
Expand Down
4 changes: 2 additions & 2 deletions Cargo.lock

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

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "xwt-web-sys"
name = "xwt-web"
version = "0.13.0"
edition = "2021"
resolver = "2"
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#![cfg(target_family = "wasm")]

use wasm_bindgen_test::*;
use xwt_web_sys::{CertificateHash, HashAlgorithm, WebTransportOptions};
use xwt_web::{CertificateHash, HashAlgorithm, WebTransportOptions};

wasm_bindgen_test::wasm_bindgen_test_configure!(run_in_browser);

static_assertions::assert_impl_all!(xwt_web_sys::Endpoint: xwt_core::endpoint::Connect);
static_assertions::assert_impl_all!(xwt_web_sys::Session: xwt_core::base::Session);
static_assertions::assert_impl_all!(xwt_web::Endpoint: xwt_core::endpoint::Connect);
static_assertions::assert_impl_all!(xwt_web::Session: xwt_core::base::Session);

fn setup() {
static INIT: std::sync::Once = std::sync::Once::new();
Expand All @@ -15,7 +15,7 @@ fn setup() {
});
}

fn test_endpoint() -> xwt_web_sys::Endpoint {
fn test_endpoint() -> xwt_web::Endpoint {
let digest = xwt_cert_fingerprint::Sha256::compute_for_der(xwt_test_assets::CERT);
console_log!("certificate sha256 digest: {digest}");

Expand All @@ -27,7 +27,7 @@ fn test_endpoint() -> xwt_web_sys::Endpoint {
..Default::default()
};

xwt_web_sys::Endpoint {
xwt_web::Endpoint {
options: options.to_js(),
}
}
Expand Down
2 changes: 1 addition & 1 deletion crates/xwt/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ the current build target (native vs wasm). For better portability, \
the `xwt-core` crate should be used instead, and the drivers should \
be hand-picked for each of the targets instead of using a crate like this one. \
We will be removing the `xwt` crate soon, and you are free to import \
`xwt-web-sys` and `xwt-wtransport` manually and put them under \
`xwt-web` and `xwt-wtransport` manually and put them under \
a `cfg_if!` macro yourself if you prefer this mode of operation; they key \
difference there is you maintain explicit control over the your driver \
dependencies rather than us having to tie them together for you - and this how \
Expand Down
2 changes: 1 addition & 1 deletion examples/microapp/client-web/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ xwt-example-client-shared = { path = "../client-shared", default-features = fals
# Core xwt primitives and driver.
xwt-cert-fingerprint = { path = "../../../crates/xwt-cert-fingerprint", default-features = false }
xwt-core = { path = "../../../crates/xwt-core", default-features = false }
xwt-web-sys = { path = "../../../crates/xwt-web-sys", default-features = false }
xwt-web = { path = "../../../crates/xwt-web", default-features = false }

# The dependency specific to this being an xwt example that is designed to
# work with an xwt test server.
Expand Down
8 changes: 4 additions & 4 deletions examples/microapp/client-web/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ use xwt_core::prelude::*;
pub async fn main() -> Result<(), JsValue> {
let server_cert_hash = xwt_cert_fingerprint::Sha256::compute_for_der(xwt_test_assets::CERT);

let options = xwt_web_sys::WebTransportOptions {
server_certificate_hashes: vec![xwt_web_sys::CertificateHash {
algorithm: xwt_web_sys::HashAlgorithm::Sha256,
let options = xwt_web::WebTransportOptions {
server_certificate_hashes: vec![xwt_web::CertificateHash {
algorithm: xwt_web::HashAlgorithm::Sha256,
value: server_cert_hash.into_inner().to_vec(),
}],
..Default::default()
};
let endpoint = xwt_web_sys::Endpoint {
let endpoint = xwt_web::Endpoint {
options: options.to_js(),
};

Expand Down
Loading