mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
* Generate EGL bindings for ohos Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com> * Adjust servoshell `bin` error message for android/ohos Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com> * ohos: disable WebGL offscreen buffers are not implemented yet on ohos. Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com> * Add OpenHarmony support to servoshell Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com> * Share ResourceReaderInstance Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com> * Share android/ohos HostTrait Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com> * Share servo glue Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com> Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com> * Pass Init options from ArkTS to Servo Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com> * f rebase ResourceReaderMethods Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com> * fixup! Share ResourceReaderInstance Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com> * Fix typo Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com> * Update Cargo.lock Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com> * ohos: Move WebGL check to webgl thread Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com> * Remove commented code Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com> * Remove commented and duplicate / unused code Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com> --------- Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com> Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
61 lines
1.5 KiB
Rust
61 lines
1.5 KiB
Rust
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
|
|
|
#[cfg(any(target_os = "macos", target_os = "linux"))]
|
|
#[macro_use]
|
|
extern crate sig;
|
|
|
|
#[cfg(test)]
|
|
mod test;
|
|
|
|
#[cfg(not(target_os = "android"))]
|
|
mod backtrace;
|
|
mod crash_handler;
|
|
#[cfg(not(any(target_os = "android", target_env = "ohos")))]
|
|
pub(crate) mod desktop;
|
|
#[cfg(any(target_os = "android", target_env = "ohos"))]
|
|
mod egl;
|
|
#[cfg(not(target_os = "android"))]
|
|
mod panic_hook;
|
|
mod parser;
|
|
mod prefs;
|
|
#[cfg(not(any(target_os = "android", target_env = "ohos")))]
|
|
mod resources;
|
|
|
|
pub mod platform {
|
|
#[cfg(target_os = "macos")]
|
|
pub use crate::platform::macos::deinit;
|
|
|
|
#[cfg(target_os = "macos")]
|
|
pub mod macos;
|
|
|
|
#[cfg(not(target_os = "macos"))]
|
|
pub fn deinit(_clean_shutdown: bool) {}
|
|
}
|
|
|
|
#[cfg(not(any(target_os = "android", target_env = "ohos")))]
|
|
pub fn main() {
|
|
desktop::cli::main()
|
|
}
|
|
|
|
#[cfg(target_os = "android")]
|
|
pub fn main() {
|
|
println!(
|
|
"Cannot start /ports/servoshell/ on Android. \
|
|
Use /support/android/apk/ + `libservoshell.so` instead"
|
|
);
|
|
}
|
|
|
|
#[cfg(target_env = "ohos")]
|
|
pub fn main() {
|
|
println!("You shouldn't start /ports/servoshell/ on OpenHarmony.");
|
|
}
|
|
|
|
pub fn servo_version() -> String {
|
|
format!(
|
|
"Servo {}-{}",
|
|
env!("CARGO_PKG_VERSION"),
|
|
env!("VERGEN_GIT_SHA")
|
|
)
|
|
}
|