File tree Expand file tree Collapse file tree 2 files changed +11
-6
lines changed
Expand file tree Collapse file tree 2 files changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -126,10 +126,10 @@ pub fn attr_macro_http_server(_attr: TokenStream, item: TokenStream) -> TokenStr
126126 quote ! {
127127 struct TheServer ;
128128
129- impl :: wstd:: wasip2:: exports:: http:: incoming_handler:: Guest for TheServer {
129+ impl :: wstd:: __internal :: wasip2:: exports:: http:: incoming_handler:: Guest for TheServer {
130130 fn handle(
131- request: :: wstd:: wasip2:: http:: types:: IncomingRequest ,
132- response_out: :: wstd:: wasip2:: http:: types:: ResponseOutparam
131+ request: :: wstd:: __internal :: wasip2:: http:: types:: IncomingRequest ,
132+ response_out: :: wstd:: __internal :: wasip2:: http:: types:: ResponseOutparam
133133 ) {
134134 #( #attrs) *
135135 #vis async fn __run( #inputs) #output {
@@ -146,7 +146,7 @@ pub fn attr_macro_http_server(_attr: TokenStream, item: TokenStream) -> TokenStr
146146 }
147147 }
148148
149- :: wstd:: wasip2:: http:: proxy:: export!( TheServer with_types_in :: wstd:: wasip2) ;
149+ :: wstd:: __internal :: wasip2:: http:: proxy:: export!( TheServer with_types_in :: wstd:: __internal :: wasip2) ;
150150
151151 // Provide an actual function named `main`.
152152 //
Original file line number Diff line number Diff line change @@ -70,9 +70,14 @@ pub use wstd_macro::attr_macro_http_server as http_server;
7070pub use wstd_macro:: attr_macro_main as main;
7171pub use wstd_macro:: attr_macro_test as test;
7272
73- // Re-export the wasi crate for use by the `http_server` macro.
73+ // Re-export the wasip2 crate for use only by `wstd-macro` macros. The proc
74+ // macros need to generate code that uses these definitions, but we don't want
75+ // to treat it as part of our public API with regards to semver, so we keep it
76+ // under `__internal` as well as doc(hidden) to indicate it is private.
7477#[ doc( hidden) ]
75- pub use wasip2;
78+ pub mod __internal {
79+ pub use wasip2;
80+ }
7681
7782pub mod prelude {
7883 pub use crate :: future:: FutureExt as _;
You can’t perform that action at this time.
0 commit comments