net: Expose make_server to other crates via test-util feature (#40943)
This PR extracts make_server() (and related helpers) from net/tests/main.rs into a reusable module, guarded by a new test-util feature.
With this change, other Servo crates, especially libservo, can spin up a lightweight http://localhost server during integration tests without pulling the full net subsystem into normal builds.
This is needed for upcoming WebView integration tests that require real origins (e.g., http://localhost) so that storage APIs can be exercised properly when testing upcoming SiteDataManager.
Testing: Unit tests continue to pass, make_ssl_server tested manually
Signed-off-by: Jan Varga jvarga@igalia.com
The Servo Parallel Browser Engine Project
Servo is a prototype web browser engine written in the Rust language. It is currently developed on 64-bit macOS, 64-bit Linux, 64-bit Windows, 64-bit OpenHarmony, and Android.
Servo welcomes contribution from everyone. Check out:
Coordination of Servo development happens:
Getting started
For more detailed build instructions, see the Servo book under Setting up your environment, Building Servo, Building for Android and Building for OpenHarmony.
macOS
brew.uv:curl -LsSf https://astral.sh/uv/install.sh | shrustup:curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | shcargois available./mach bootstrap./mach buildLinux
curl:sudo pacman -S --needed curlsudo apt install curlsudo dnf install curlsudo emerge net-misc/curluv:curl -LsSf https://astral.sh/uv/install.sh | shrustup:curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | shcargois available./mach bootstrap./mach buildWindows
uv,choco, andrustupMicrosoft.VisualStudio.Component.Windows{10, 11}SDK.{>=19041})Microsoft.VisualStudio.Component.VC.Tools.x86.x64)Microsoft.VisualStudio.Component.VC.ATL)cargois available.\mach bootstrap.\mach buildAndroid
ANDROID_SDK_ROOTANDROID_NDK_ROOT:$ANDROID_SDK_ROOT/ndk/28.2.13676358/ANDROID_SDK_ROOTcan be any directory (such as~/android-sdk). All of the Android build dependencies will be installed there.$ANDROID_SDK_ROOT/cmdline-tools/latest.OpenHarmony
HarmonyOS NEXTvs pureOpenHarmony) the build configuration will differ slightly.DEVECO_SDK_HOME(Required when targetingHarmonyOS NEXT)OHOS_BASE_SDK_HOME(Required when targetingOpenHarmony)OHOS_SDK_NATIVE(e.g.${DEVECO_SDK_HOME}/default/openharmony/nativeor${OHOS_BASE_SDK_HOME}/${API_VERSION}/native)SERVO_OHOS_SIGNING_CONFIG: Path to json file containing a valid signing configuration for the demo app.--flavor=<default|harmonyos>tomach <build|package|install>.