-
Notifications
You must be signed in to change notification settings - Fork 54
Replace cmake with cc #58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -1,168 +1,64 @@ | ||||||||||||||||||||||||||||||||||||||||||||||||||
#![allow(clippy::collapsible_if)] | ||||||||||||||||||||||||||||||||||||||||||||||||||
use cmake::Config; | ||||||||||||||||||||||||||||||||||||||||||||||||||
use std::env; | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||
enum CMakeBuildType { | ||||||||||||||||||||||||||||||||||||||||||||||||||
Debug, | ||||||||||||||||||||||||||||||||||||||||||||||||||
Release, | ||||||||||||||||||||||||||||||||||||||||||||||||||
RelWithDebInfo, | ||||||||||||||||||||||||||||||||||||||||||||||||||
MinSizeRel, | ||||||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||
/// Determine the CMake build type that will be picked by `cmake-rs`. | ||||||||||||||||||||||||||||||||||||||||||||||||||
/// | ||||||||||||||||||||||||||||||||||||||||||||||||||
/// This is mostly pasted from `cmake-rs`: | ||||||||||||||||||||||||||||||||||||||||||||||||||
/// https://github.com/alexcrichton/cmake-rs/blob/7f85e323/src/lib.rs#L498 | ||||||||||||||||||||||||||||||||||||||||||||||||||
fn get_cmake_build_type() -> Result<CMakeBuildType, String> { | ||||||||||||||||||||||||||||||||||||||||||||||||||
fn getenv(v: &str) -> Result<String, String> { | ||||||||||||||||||||||||||||||||||||||||||||||||||
env::var(v).map_err(|_| format!("environment variable `{}` not defined", v)) | ||||||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||
// Determine Rust's profile, optimization level, and debug info: | ||||||||||||||||||||||||||||||||||||||||||||||||||
#[derive(PartialEq)] | ||||||||||||||||||||||||||||||||||||||||||||||||||
enum RustProfile { | ||||||||||||||||||||||||||||||||||||||||||||||||||
Debug, | ||||||||||||||||||||||||||||||||||||||||||||||||||
Release, | ||||||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||||||
#[derive(PartialEq, Debug)] | ||||||||||||||||||||||||||||||||||||||||||||||||||
enum OptLevel { | ||||||||||||||||||||||||||||||||||||||||||||||||||
Debug, | ||||||||||||||||||||||||||||||||||||||||||||||||||
Release, | ||||||||||||||||||||||||||||||||||||||||||||||||||
Size, | ||||||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||
let rust_profile = match getenv("PROFILE")?.as_str() { | ||||||||||||||||||||||||||||||||||||||||||||||||||
"debug" => RustProfile::Debug, | ||||||||||||||||||||||||||||||||||||||||||||||||||
"release" | "bench" => RustProfile::Release, | ||||||||||||||||||||||||||||||||||||||||||||||||||
_ => RustProfile::Release, | ||||||||||||||||||||||||||||||||||||||||||||||||||
}; | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||
let opt_level = match getenv("OPT_LEVEL")?.as_str() { | ||||||||||||||||||||||||||||||||||||||||||||||||||
"0" => OptLevel::Debug, | ||||||||||||||||||||||||||||||||||||||||||||||||||
"1" | "2" | "3" => OptLevel::Release, | ||||||||||||||||||||||||||||||||||||||||||||||||||
"s" | "z" => OptLevel::Size, | ||||||||||||||||||||||||||||||||||||||||||||||||||
_ => match rust_profile { | ||||||||||||||||||||||||||||||||||||||||||||||||||
RustProfile::Debug => OptLevel::Debug, | ||||||||||||||||||||||||||||||||||||||||||||||||||
RustProfile::Release => OptLevel::Release, | ||||||||||||||||||||||||||||||||||||||||||||||||||
}, | ||||||||||||||||||||||||||||||||||||||||||||||||||
}; | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||
let debug_info: bool = match getenv("DEBUG")?.as_str() { | ||||||||||||||||||||||||||||||||||||||||||||||||||
"false" => false, | ||||||||||||||||||||||||||||||||||||||||||||||||||
"true" => true, | ||||||||||||||||||||||||||||||||||||||||||||||||||
_ => true, | ||||||||||||||||||||||||||||||||||||||||||||||||||
}; | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||
Ok(match (opt_level, debug_info) { | ||||||||||||||||||||||||||||||||||||||||||||||||||
(OptLevel::Debug, _) => CMakeBuildType::Debug, | ||||||||||||||||||||||||||||||||||||||||||||||||||
(OptLevel::Release, false) => CMakeBuildType::Release, | ||||||||||||||||||||||||||||||||||||||||||||||||||
(OptLevel::Release, true) => CMakeBuildType::RelWithDebInfo, | ||||||||||||||||||||||||||||||||||||||||||||||||||
(OptLevel::Size, _) => CMakeBuildType::MinSizeRel, | ||||||||||||||||||||||||||||||||||||||||||||||||||
}) | ||||||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||
fn main() { | ||||||||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It would be nice to add println!("cargo:rerun-if-changed=c_src/mimalloc"); here, so that when changing the code in the -sys crate it doesnt rebuild each time (by default it's any change in the folder containing the build.rs). |
||||||||||||||||||||||||||||||||||||||||||||||||||
let mut cfg = &mut Config::new("c_src/mimalloc"); | ||||||||||||||||||||||||||||||||||||||||||||||||||
let mut build = cc::Build::new(); | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||
build.include("c_src/mimalloc/include"); | ||||||||||||||||||||||||||||||||||||||||||||||||||
build.files( | ||||||||||||||||||||||||||||||||||||||||||||||||||
[ | ||||||||||||||||||||||||||||||||||||||||||||||||||
"alloc-aligned", | ||||||||||||||||||||||||||||||||||||||||||||||||||
"alloc-posix", | ||||||||||||||||||||||||||||||||||||||||||||||||||
"alloc", | ||||||||||||||||||||||||||||||||||||||||||||||||||
"arena", | ||||||||||||||||||||||||||||||||||||||||||||||||||
"bitmap", | ||||||||||||||||||||||||||||||||||||||||||||||||||
"heap", | ||||||||||||||||||||||||||||||||||||||||||||||||||
"init", | ||||||||||||||||||||||||||||||||||||||||||||||||||
"options", | ||||||||||||||||||||||||||||||||||||||||||||||||||
"os", | ||||||||||||||||||||||||||||||||||||||||||||||||||
"page", | ||||||||||||||||||||||||||||||||||||||||||||||||||
"random", | ||||||||||||||||||||||||||||||||||||||||||||||||||
"region", | ||||||||||||||||||||||||||||||||||||||||||||||||||
"segment", | ||||||||||||||||||||||||||||||||||||||||||||||||||
"stats", | ||||||||||||||||||||||||||||||||||||||||||||||||||
] | ||||||||||||||||||||||||||||||||||||||||||||||||||
.iter() | ||||||||||||||||||||||||||||||||||||||||||||||||||
.map(|fname| format!("c_src/mimalloc/src/{}.c", fname)), | ||||||||||||||||||||||||||||||||||||||||||||||||||
); | ||||||||||||||||||||||||||||||||||||||||||||||||||
Comment on lines
+6
to
+26
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
We should just compile https://github.com/microsoft/mimalloc/blob/master/src/static.c as a single compilation unit build. This mimics the This has several benefits:
|
||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||
build.define("MI_STATIC_LIB", None); | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||
let target_os = env::var("CARGO_CFG_TARGET_OS").expect("target_os not defined!"); | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||
if cfg!(feature = "override") { | ||||||||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nit: prefer (Thanks for doing this for There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also, we should consider disabling the override on at least macOS (probably other platforms too...) until #41 is resolved. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. (Actually, probably best to address that separately) |
||||||||||||||||||||||||||||||||||||||||||||||||||
cfg = cfg.define("MI_OVERRIDE", "ON"); | ||||||||||||||||||||||||||||||||||||||||||||||||||
} else { | ||||||||||||||||||||||||||||||||||||||||||||||||||
cfg = cfg.define("MI_OVERRIDE", "OFF"); | ||||||||||||||||||||||||||||||||||||||||||||||||||
// Overriding malloc is only available on windows in shared mode, but we | ||||||||||||||||||||||||||||||||||||||||||||||||||
// only ever build a static lib. | ||||||||||||||||||||||||||||||||||||||||||||||||||
if target_os != "windows" { | ||||||||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should check the target family, not target_os |
||||||||||||||||||||||||||||||||||||||||||||||||||
build.define("MI_MALLOC_OVERRIDE", None); | ||||||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||
cfg = cfg.define("MI_BUILD_TESTS", "OFF"); | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||
if cfg!(feature = "secure") { | ||||||||||||||||||||||||||||||||||||||||||||||||||
cfg = cfg.define("MI_SECURE", "ON"); | ||||||||||||||||||||||||||||||||||||||||||||||||||
} else { | ||||||||||||||||||||||||||||||||||||||||||||||||||
cfg = cfg.define("MI_SECURE", "OFF"); | ||||||||||||||||||||||||||||||||||||||||||||||||||
build.define("MI_SECURE", "4"); | ||||||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||
if cfg!(feature = "local_dynamic_tls") { | ||||||||||||||||||||||||||||||||||||||||||||||||||
cfg = cfg.define("MI_LOCAL_DYNAMIC_TLS", "ON"); | ||||||||||||||||||||||||||||||||||||||||||||||||||
} else { | ||||||||||||||||||||||||||||||||||||||||||||||||||
cfg = cfg.define("MI_LOCAL_DYNAMIC_TLS", "OFF"); | ||||||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||
// Inject MI_DEBUG=0 | ||||||||||||||||||||||||||||||||||||||||||||||||||
// This set mi_option_verbose and mi_option_show_errors options to false. | ||||||||||||||||||||||||||||||||||||||||||||||||||
cfg = cfg.define("mi_defines", "MI_DEBUG=0"); | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||
let (is_debug, win_folder) = match get_cmake_build_type() { | ||||||||||||||||||||||||||||||||||||||||||||||||||
Ok(CMakeBuildType::Debug) => (true, "Debug"), | ||||||||||||||||||||||||||||||||||||||||||||||||||
Ok(CMakeBuildType::Release) => (false, "Release"), | ||||||||||||||||||||||||||||||||||||||||||||||||||
Ok(CMakeBuildType::RelWithDebInfo) => (false, "RelWithDebInfo"), | ||||||||||||||||||||||||||||||||||||||||||||||||||
Ok(CMakeBuildType::MinSizeRel) => (false, "MinSizeRel"), | ||||||||||||||||||||||||||||||||||||||||||||||||||
Err(e) => panic!("Cannot determine CMake build type: {}", e), | ||||||||||||||||||||||||||||||||||||||||||||||||||
}; | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||
// Turning off shared lib, tests, PADDING. | ||||||||||||||||||||||||||||||||||||||||||||||||||
// See also: https://github.com/microsoft/mimalloc/blob/master/CMakeLists.txt | ||||||||||||||||||||||||||||||||||||||||||||||||||
cfg = cfg.define("MI_PADDING", "OFF"); | ||||||||||||||||||||||||||||||||||||||||||||||||||
cfg = cfg.define("MI_BUILD_TESTS", "OFF"); | ||||||||||||||||||||||||||||||||||||||||||||||||||
cfg = cfg.define("MI_BUILD_SHARED", "OFF"); | ||||||||||||||||||||||||||||||||||||||||||||||||||
cfg = cfg.define("MI_BUILD_OBJECT", "OFF"); | ||||||||||||||||||||||||||||||||||||||||||||||||||
let dynamic_tls = cfg!(feature = "local_dynamic_tls"); | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||
let target_env = env::var("CARGO_CFG_TARGET_ENV").unwrap(); | ||||||||||||||||||||||||||||||||||||||||||||||||||
if target_env == "msvc" { | ||||||||||||||||||||||||||||||||||||||||||||||||||
cfg = cfg.define("CMAKE_SH", "CMAKE_SH-NOTFOUND"); | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||
// cc::get_compiler have /nologo /MD default flags that are cmake::Config | ||||||||||||||||||||||||||||||||||||||||||||||||||
// defaults to. Those flags prevents mimalloc from building on windows | ||||||||||||||||||||||||||||||||||||||||||||||||||
// extracted from default cmake configuration on windows | ||||||||||||||||||||||||||||||||||||||||||||||||||
if is_debug { | ||||||||||||||||||||||||||||||||||||||||||||||||||
// CMAKE_C_FLAGS + CMAKE_C_FLAGS_DEBUG | ||||||||||||||||||||||||||||||||||||||||||||||||||
cfg = cfg.cflag("/DWIN32 /D_WINDOWS /W3 /MDd /Zi /Ob0 /Od /RTC1"); | ||||||||||||||||||||||||||||||||||||||||||||||||||
} else { | ||||||||||||||||||||||||||||||||||||||||||||||||||
// CMAKE_C_FLAGS + CMAKE_C_FLAGS_RELEASE | ||||||||||||||||||||||||||||||||||||||||||||||||||
cfg = cfg.cflag("/DWIN32 /D_WINDOWS /W3 /MD /O2 /Ob2 /DNDEBUG"); | ||||||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||||||
} else if target_env == "gnu" { | ||||||||||||||||||||||||||||||||||||||||||||||||||
cfg = cfg.define("CMAKE_SH", "CMAKE_SH-NOTFOUND"); | ||||||||||||||||||||||||||||||||||||||||||||||||||
// Those flags prevents mimalloc from building on windows | ||||||||||||||||||||||||||||||||||||||||||||||||||
if is_debug { | ||||||||||||||||||||||||||||||||||||||||||||||||||
// CMAKE_C_FLAGS + CMAKE_C_FLAGS_DEBUG | ||||||||||||||||||||||||||||||||||||||||||||||||||
cfg = cfg.cflag("-ffunction-sections -fdata-sections -m64 -O2 -fpic"); | ||||||||||||||||||||||||||||||||||||||||||||||||||
if env::var("CARGO_CFG_TARGET_FAMILY").expect("target family not set") == "unix" | ||||||||||||||||||||||||||||||||||||||||||||||||||
&& target_os != "haiku" | ||||||||||||||||||||||||||||||||||||||||||||||||||
{ | ||||||||||||||||||||||||||||||||||||||||||||||||||
if dynamic_tls { | ||||||||||||||||||||||||||||||||||||||||||||||||||
build.flag_if_supported("-ftls-model=local-dynamic"); | ||||||||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Honestly, this is dubious since it goes against the settings rustc uses, but I'll file another issue about it. |
||||||||||||||||||||||||||||||||||||||||||||||||||
} else { | ||||||||||||||||||||||||||||||||||||||||||||||||||
// CMAKE_C_FLAGS + CMAKE_C_FLAGS_RELEASE | ||||||||||||||||||||||||||||||||||||||||||||||||||
cfg = cfg.cflag("-ffunction-sections -fdata-sections -m64 -O3 -fpic"); | ||||||||||||||||||||||||||||||||||||||||||||||||||
build.flag_if_supported("-ftls-model=initial-exec"); | ||||||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||||||
}; | ||||||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||
let mut out_dir = "./build".to_string(); | ||||||||||||||||||||||||||||||||||||||||||||||||||
if cfg!(all(windows)) { | ||||||||||||||||||||||||||||||||||||||||||||||||||
if target_env == "msvc" { | ||||||||||||||||||||||||||||||||||||||||||||||||||
out_dir.push('/'); | ||||||||||||||||||||||||||||||||||||||||||||||||||
out_dir.push_str(win_folder); | ||||||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||||||
// Remove heavy debug assertions etc | ||||||||||||||||||||||||||||||||||||||||||||||||||
build.define("MI_DEBUG", "0"); | ||||||||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should eventually have an option to turn this on. That said, we should set There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmm, while mimalloc does use NDEBUG, it's not for assertions and just for a couple extra things. I'll file an issue with mimalloc, what we have here is fine actually. |
||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||
if build.get_compiler().is_like_msvc() { | ||||||||||||||||||||||||||||||||||||||||||||||||||
build.cpp(true); | ||||||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||||||
let out_name = if cfg!(all(windows)) { | ||||||||||||||||||||||||||||||||||||||||||||||||||
if is_debug { | ||||||||||||||||||||||||||||||||||||||||||||||||||
if cfg!(feature = "secure") { | ||||||||||||||||||||||||||||||||||||||||||||||||||
"mimalloc-static-secure-debug" | ||||||||||||||||||||||||||||||||||||||||||||||||||
} else { | ||||||||||||||||||||||||||||||||||||||||||||||||||
"mimalloc-static-debug" | ||||||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||||||
} else if cfg!(feature = "secure") { | ||||||||||||||||||||||||||||||||||||||||||||||||||
"mimalloc-static-secure" | ||||||||||||||||||||||||||||||||||||||||||||||||||
} else { | ||||||||||||||||||||||||||||||||||||||||||||||||||
"mimalloc-static" | ||||||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||||||
} else if is_debug { | ||||||||||||||||||||||||||||||||||||||||||||||||||
if cfg!(feature = "secure") { | ||||||||||||||||||||||||||||||||||||||||||||||||||
"mimalloc-secure-debug" | ||||||||||||||||||||||||||||||||||||||||||||||||||
} else { | ||||||||||||||||||||||||||||||||||||||||||||||||||
"mimalloc-debug" | ||||||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||||||
} else if cfg!(feature = "secure") { | ||||||||||||||||||||||||||||||||||||||||||||||||||
"mimalloc-secure" | ||||||||||||||||||||||||||||||||||||||||||||||||||
} else { | ||||||||||||||||||||||||||||||||||||||||||||||||||
"mimalloc" | ||||||||||||||||||||||||||||||||||||||||||||||||||
}; | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||
// Build mimalloc-static | ||||||||||||||||||||||||||||||||||||||||||||||||||
let mut dst = cfg.build_target("mimalloc-static").build(); | ||||||||||||||||||||||||||||||||||||||||||||||||||
dst.push(out_dir); | ||||||||||||||||||||||||||||||||||||||||||||||||||
println!("cargo:rustc-link-search=native={}", dst.display()); | ||||||||||||||||||||||||||||||||||||||||||||||||||
println!("cargo:rustc-link-lib={}", out_name); | ||||||||||||||||||||||||||||||||||||||||||||||||||
build.compile("mimalloc"); | ||||||||||||||||||||||||||||||||||||||||||||||||||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was actually intentional, some markdown renderers don't actually handle the
toml
code fence, whereasini
is usually recognized and tends to be highlighted correctly, at least for simpler code blocks such as this, but I can of course change it to be toml.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Huh, TIL. I have no stake in this either way. It just struck me as odd.