Skip to content

Commit d016a5c

Browse files
authored
feat: Add support for wasm32-unknown-unknown compilation target (#44)
1 parent 2ce1007 commit d016a5c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/lib.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,7 @@ fn normalize_ssh_url(url: &str) -> Result<Url> {
332332
/// `normalize_file_path` takes in a filepath and uses `Url::from_file_path()` to parse
333333
///
334334
/// Prepends `file://` to url
335+
#[cfg(any(unix, windows, target_os = "redox", target_os = "wasi"))]
335336
fn normalize_file_path(filepath: &str) -> Result<Url> {
336337
let fp = Url::from_file_path(filepath);
337338

@@ -342,6 +343,11 @@ fn normalize_file_path(filepath: &str) -> Result<Url> {
342343
}
343344
}
344345

346+
#[cfg(target_arch = "wasm32")]
347+
fn normalize_file_path(_filepath: &str) -> Result<Url> {
348+
unreachable!()
349+
}
350+
345351
/// `normalize_url` takes in url as `&str` and takes an opinionated approach to identify
346352
/// `ssh://` or `file://` urls that require more information to be added so that
347353
/// they can be parsed more effectively by `url::Url::parse()`

0 commit comments

Comments
 (0)