소스 검색

fix: enable wasip2 feature for wasm32-wasip2 target (#960)

Signed-off-by: Brooks Townsend <brooksmtownsend@gmail.com>
Brooks Townsend 2 년 전
부모
커밋
c04aca3f74
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  1. 3 0
      url/src/lib.rs

+ 3 - 0
url/src/lib.rs

@@ -139,6 +139,9 @@ url = { version = "2", features = ["debugger_visualizer"] }
     feature = "debugger_visualizer",
     debugger_visualizer(natvis_file = "../../debug_metadata/url.natvis")
 )]
+// We use std::os::wasi::prelude::OsStrExt, and that is conditionally feature gated
+// to be unstable on wasm32-wasip2. https://github.com/rust-lang/rust/issues/130323
+#![cfg_attr(all(target_os = "wasi", target_env = "p2"), feature(wasip2))]
 
 pub use form_urlencoded;