Skip to content
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

feat: allow building with the system Lua #969

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
6 changes: 5 additions & 1 deletion yazi-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,12 @@ description = "Yazi command-line interface"
homepage = "https://yazi-rs.github.io"
repository = "https://github.com/sxyazi/yazi"

[features]
default = [ "vendored-lua" ]
vendored-lua = [ "yazi-dds/vendored-lua" ]

[dependencies]
yazi-dds = { path = "../yazi-dds", version = "0.2.5" }
yazi-dds = { path = "../yazi-dds", version = "0.2.5", default-features = false }

# External dependencies
anyhow = "1.0.82"
Expand Down
6 changes: 3 additions & 3 deletions yazi-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ repository = "https://github.com/sxyazi/yazi"
yazi-adaptor = { path = "../yazi-adaptor", version = "0.2.5" }
yazi-boot = { path = "../yazi-boot", version = "0.2.5" }
yazi-config = { path = "../yazi-config", version = "0.2.5" }
yazi-dds = { path = "../yazi-dds", version = "0.2.5" }
yazi-plugin = { path = "../yazi-plugin", version = "0.2.5" }
yazi-proxy = { path = "../yazi-proxy", version = "0.2.5" }
yazi-dds = { path = "../yazi-dds", version = "0.2.5", default-features = false }
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need to add default-features = false to yazi-core? yazi-core is not the entry point of the program, is this necessary?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, because that dependency would otherwise expect to have those features, and we cannot override that without making enabling that feature not the default.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cargo tree seems unreliable for these tests, so I just eza -l target/release and compare the sizes. Without this there is no size difference between the default and --no-default-features, but with this there is a difference.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What command did you use for building?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cargo build with and without --release and with and without --no-default-features

yazi-plugin = { path = "../yazi-plugin", version = "0.2.5", default-features = false }
yazi-proxy = { path = "../yazi-proxy", version = "0.2.5", default-features = false }
yazi-scheduler = { path = "../yazi-scheduler", version = "0.2.5" }
yazi-shared = { path = "../yazi-shared", version = "0.2.5" }

Expand Down
8 changes: 4 additions & 4 deletions yazi-fm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@ repository = "https://github.com/sxyazi/yazi"

[features]
default = [ "vendored-lua" ]
vendored-lua = [ "mlua/vendored" ]
vendored-lua = [ "mlua/vendored", "yazi-dds/vendored-lua", "yazi-plugin/vendored-lua", "yazi-proxy/vendored-lua" ]

[dependencies]
yazi-adaptor = { path = "../yazi-adaptor", version = "0.2.5" }
yazi-boot = { path = "../yazi-boot", version = "0.2.5" }
yazi-config = { path = "../yazi-config", version = "0.2.5" }
yazi-core = { path = "../yazi-core", version = "0.2.5" }
yazi-dds = { path = "../yazi-dds", version = "0.2.5" }
yazi-plugin = { path = "../yazi-plugin", version = "0.2.5" }
yazi-proxy = { path = "../yazi-proxy", version = "0.2.5" }
yazi-dds = { path = "../yazi-dds", version = "0.2.5", default-features = false }
yazi-plugin = { path = "../yazi-plugin", version = "0.2.5", default-features = false }
yazi-proxy = { path = "../yazi-proxy", version = "0.2.5", default-features = false }
yazi-shared = { path = "../yazi-shared", version = "0.2.5" }

# External dependencies
Expand Down
4 changes: 2 additions & 2 deletions yazi-plugin/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ vendored-lua = [ "mlua/vendored" ]
yazi-adaptor = { path = "../yazi-adaptor", version = "0.2.5" }
yazi-boot = { path = "../yazi-boot", version = "0.2.5" }
yazi-config = { path = "../yazi-config", version = "0.2.5" }
yazi-dds = { path = "../yazi-dds", version = "0.2.5" }
yazi-proxy = { path = "../yazi-proxy", version = "0.2.5" }
yazi-dds = { path = "../yazi-dds", version = "0.2.5", default-features = false }
yazi-proxy = { path = "../yazi-proxy", version = "0.2.5", default-features = false }
yazi-shared = { path = "../yazi-shared", version = "0.2.5" }

# External dependencies
Expand Down
6 changes: 3 additions & 3 deletions yazi-scheduler/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ repository = "https://github.com/sxyazi/yazi"

[dependencies]
yazi-config = { path = "../yazi-config", version = "0.2.5" }
yazi-dds = { path = "../yazi-dds", version = "0.2.5" }
yazi-plugin = { path = "../yazi-plugin", version = "0.2.5" }
yazi-proxy = { path = "../yazi-proxy", version = "0.2.5" }
yazi-dds = { path = "../yazi-dds", version = "0.2.5", default-features = false }
yazi-plugin = { path = "../yazi-plugin", version = "0.2.5", default-features = false }
yazi-proxy = { path = "../yazi-proxy", version = "0.2.5", default-features = false }
yazi-shared = { path = "../yazi-shared", version = "0.2.5" }

# External dependencies
Expand Down