Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 8 additions & 1 deletion stageleft_test_no_entry/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,21 @@ stageleft = { path = "../stageleft", version = "^0.15.0" }

slotmap = "1.0.0"

# optional dep with implicit feature (feature "once_cell" auto-created)
# optional dep with implicit feature (feature "once_cell" auto-created),
# also enabled by the strong `once_cell/...` reference in `my_strong_ref_feature`
once_cell = { version = "1.20", optional = true }

# optional dep gated by explicit feature via dep: syntax
cfg-if = { version = "1.0", optional = true }

[features]
my_cfg_feature = ["dep:cfg-if"]
my_strong_ref_feature = ["once_cell/std"]
my_weak_ref_feature = ["once_cell?/std"]

# target-specific dependencies should be re-exported gated on the target cfg
[target.'cfg(unix)'.dependencies]
libc = "0.2"

[build-dependencies]
stageleft_tool = { path = "../stageleft_tool", version = "^0.15.0" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ expression: "include_str!(concat!(env!(\"OUT_DIR\"), stageleft::PATH_SEPARATOR!(
pub mod __deps {
pub use stageleft;
pub use slotmap;
#[cfg(any(feature = "once_cell"))]
#[cfg(any(feature = "my_strong_ref_feature", feature = "once_cell"))]
pub use once_cell;
#[cfg(any(feature = "my_cfg_feature"))]
pub use cfg_if;
#[cfg(unix)]
pub use libc;
stageleft::internal::ctor::declarative::ctor! {
#[ctor(unsafe)] fn __init() { {
stageleft::internal::add_deps_reexport(vec!["stageleft"],
Expand All @@ -21,7 +23,8 @@ pub mod __deps {
.replace("-", "_"), ::std::borrow::ToOwned::to_owned("__staged"),
::std::borrow::ToOwned::to_owned("__deps"),
::std::borrow::ToOwned::to_owned("slotmap"),]); } #[cfg(any(feature =
"once_cell"))] { stageleft::internal::add_deps_reexport(vec!["once_cell"],
"my_strong_ref_feature", feature = "once_cell"))] {
stageleft::internal::add_deps_reexport(vec!["once_cell"],
vec![option_env!("STAGELEFT_FINAL_CRATE_NAME") .unwrap_or(env!("CARGO_PKG_NAME"))
.replace("-", "_"), ::std::borrow::ToOwned::to_owned("__staged"),
::std::borrow::ToOwned::to_owned("__deps"),
Expand All @@ -30,7 +33,12 @@ pub mod __deps {
vec![option_env!("STAGELEFT_FINAL_CRATE_NAME") .unwrap_or(env!("CARGO_PKG_NAME"))
.replace("-", "_"), ::std::borrow::ToOwned::to_owned("__staged"),
::std::borrow::ToOwned::to_owned("__deps"),
::std::borrow::ToOwned::to_owned("cfg_if"),]); }
::std::borrow::ToOwned::to_owned("cfg_if"),]); } #[cfg(unix)] {
stageleft::internal::add_deps_reexport(vec!["libc"],
vec![option_env!("STAGELEFT_FINAL_CRATE_NAME") .unwrap_or(env!("CARGO_PKG_NAME"))
.replace("-", "_"), ::std::borrow::ToOwned::to_owned("__staged"),
::std::borrow::ToOwned::to_owned("__deps"),
::std::borrow::ToOwned::to_owned("libc"),]); }
stageleft::internal::add_crate_with_staged(env!("CARGO_PKG_NAME") .replace("-",
"_")); }
}
Expand Down
Loading
Loading