feat: adapts build meta for wasm target (#1243)

This commit is contained in:
Myriad-Dreamin 2025-02-02 13:59:44 +08:00 committed by GitHub
parent 4eb747f883
commit 74c68f5485
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 14 additions and 8 deletions

View file

@ -218,6 +218,12 @@ broken_intra_doc_links = "warn"
missing_docs = "warn"
# missing_crate_level_docs = "warn"
unexpected_cfgs = { level = "allow", check-cfg = [
'cfg(wasm_bindgen_unstable_test_coverage)',
'cfg(noop)',
'cfg(used_linker)',
] }
[workspace.lints.clippy]
uninlined_format_args = "warn"
# missing_errors_doc = "warn"

View file

@ -42,7 +42,7 @@ pub struct DiagMessage {
/// The file path relative to the root of the workspace or the package.
pub path: String,
/// The diagnostic message.
pub message: String,
pub message: EcoString,
/// The severity of the diagnostic message.
pub severity: DiagSeverity,
/// The char range in the file. The position encoding must be negotiated.
@ -410,30 +410,30 @@ pub mod prelude {
#[macro_export]
macro_rules! error_once {
($loc:expr, $($arg_key:ident: $arg:expr),+ $(,)?) => {
_error_once($loc, Box::new([$((stringify!($arg_key), $arg.to_string())),+]))
$crate::error::prelude::_error_once($loc, Box::new([$((stringify!($arg_key), $arg.to_string())),+]))
};
($loc:expr $(,)?) => {
_error_once($loc, Box::new([]))
$crate::error::prelude::_error_once($loc, Box::new([]))
};
}
#[macro_export]
macro_rules! error_once_map {
($loc:expr, $($arg_key:ident: $arg:expr),+ $(,)?) => {
map_err_with_args($loc, [$((stringify!($arg_key), $arg.to_string())),+])
$crate::error::prelude::map_err_with_args($loc, [$((stringify!($arg_key), $arg.to_string())),+])
};
($loc:expr $(,)?) => {
map_err($loc)
$crate::error::prelude::map_err($loc)
};
}
#[macro_export]
macro_rules! error_once_map_string {
($loc:expr, $($arg_key:ident: $arg:expr),+ $(,)?) => {
map_string_err_with_args($loc, [$((stringify!($arg_key), $arg.to_string())),+])
$crate::error::prelude::map_string_err_with_args($loc, [$((stringify!($arg_key), $arg.to_string())),+])
};
($loc:expr $(,)?) => {
map_string_err($loc)
$crate::error::prelude::map_string_err($loc)
};
}

View file

@ -56,7 +56,7 @@ web = [
"tinymist-vfs/web",
"reflexo-typst/web",
]
browser = ["web"]
browser = ["tinymist-vfs/browser", "web"]
system = [
"dep:dirs",
"dep:fontdb",