-
-
Notifications
You must be signed in to change notification settings - Fork 146
feat: no-std support #455
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
base: main
Are you sure you want to change the base?
feat: no-std support #455
Changes from 4 commits
243ea53
79fbd0a
18c217f
359941f
9af0988
9bdf23a
09e1090
c07cab4
c5ddfdc
f346d78
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 |
|---|---|---|
|
|
@@ -13,9 +13,11 @@ rust-version = "1.82.0" | |
| exclude = ["images/", "tests/", "miette-derive/"] | ||
|
|
||
| [dependencies] | ||
| thiserror = "2.0.11" | ||
| miette-derive = { path = "miette-derive", version = "=7.6.0", optional = true } | ||
| unicode-width = "0.2.0" | ||
| unicode-width = { version = "0.2.0", default-features = false } | ||
huitseeker marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| cfg-if = "1.0.0" | ||
| spin = { version = "0.9", default-features = false, features = ["mutex", "spin_mutex", "lazy"] } | ||
|
||
|
|
||
| owo-colors = { version = "4.0.0", optional = true } | ||
| textwrap = { version = "0.16.0", default-features = false, features = ["unicode-linebreak", "unicode-width"], optional = true } | ||
|
|
@@ -29,23 +31,23 @@ serde = { version = "1.0.196", features = ["derive"], optional = true } | |
| syntect = { version = "5.1.0", optional = true } | ||
|
|
||
| [dev-dependencies] | ||
| thiserror = "2.0.11" | ||
| semver = "1.0.21" | ||
|
|
||
| # Eyre devdeps | ||
| futures = { version = "0.3", default-features = false } | ||
| indenter = "0.3.3" | ||
| rustversion = "1.0" | ||
| trybuild = { version = "1.0.89", features = ["diff"] } | ||
| syn = { version = "2.0.87", features = ["full"] } | ||
| regex = "1.10" | ||
|
|
||
| serde = { version = "1.0.196", features = ["derive"] } | ||
| serde_json = "1.0.113" | ||
| strip-ansi-escapes = "0.2.0" | ||
|
|
||
| [build-dependencies] | ||
huitseeker marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| rustc_version = "0.2" | ||
|
|
||
| [features] | ||
| default = ["derive"] | ||
| default = ["derive", "std"] | ||
| std = ["thiserror/std", "fancy-no-syscall"] | ||
| derive = ["dep:miette-derive"] | ||
| no-format-args-capture = [] | ||
| fancy-base = [ | ||
|
|
@@ -63,7 +65,7 @@ fancy-no-backtrace = [ | |
| "dep:supports-unicode", | ||
| ] | ||
| fancy = ["fancy-no-backtrace", "dep:backtrace", "dep:backtrace-ext"] | ||
| syntect-highlighter = ["fancy-no-backtrace", "dep:syntect"] | ||
| syntect-highlighter = ["fancy-no-backtrace", "dep:syntect", "std"] | ||
|
|
||
| [workspace] | ||
| members = ["miette-derive"] | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| use rustc_version::{version_meta, Channel}; | ||
|
|
||
| fn main() { | ||
| if let Channel::Nightly = version_meta().unwrap().channel { | ||
| println!("cargo:rustc-cfg=nightly") | ||
huitseeker marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| } | ||
|
|
||
| // track_caller is stable since Rust 1.46 (2020), so no version check needed | ||
| println!("cargo:rustc-cfg=track_caller"); | ||
|
|
||
| // Add check-cfg for conditional configurations | ||
| println!("cargo:rustc-check-cfg=cfg(doc_cfg)"); | ||
| println!("cargo:rustc-check-cfg=cfg(track_caller)"); | ||
| println!("cargo:rustc-check-cfg=cfg(nightly)"); | ||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.