Skip to content

Commit 3c41b85

Browse files
authored
Compile localizations with build.rs (#591)
1 parent 63d2574 commit 3c41b85

File tree

6 files changed

+1097
-1111
lines changed

6 files changed

+1097
-1111
lines changed

Cargo.lock

Lines changed: 47 additions & 122 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,13 @@ lto = "thin" # Similarly, speed up linking by a ton
3838
[target.'cfg(unix)'.dependencies]
3939
libc = "0.2"
4040

41+
[build-dependencies]
42+
# The default toml crate bundles its dependencies with bad compile times. Thanks.
43+
# Thankfully toml-span exists. FWIW the alternative is yaml-rust (without the 2 suffix).
44+
toml-span = { version = "0.5", default-features = false }
45+
4146
[target.'cfg(windows)'.build-dependencies]
42-
winresource = "0.1.22"
47+
winresource = { version = "0.1.22", default-features = false }
4348

4449
[target.'cfg(windows)'.dependencies.windows-sys]
4550
version = "0.59"
@@ -56,7 +61,7 @@ features = [
5661
]
5762

5863
[dev-dependencies]
59-
criterion = { version = "0.6", features = ["html_reports"] }
64+
criterion = { version = "0.7", features = ["html_reports"] }
6065
serde = { version = "1.0", features = ["derive"] }
6166
serde_json = { version = "1.0" }
6267
zstd = { version = "0.13", default-features = false }

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,15 @@ winget install Microsoft.Edit
2727
* Clone the repository
2828
* For a release build, run: `cargo build --config .cargo/release.toml --release`
2929

30+
### Build Configuration
31+
32+
During compilation you can set various environment variables to configure the build. The following table lists the available configuration options:
33+
34+
Environment variable | Description
35+
--- | ---
36+
`EDIT_CFG_ICU*` | See [ICU library name (SONAME)](#icu-library-name-soname) for details.
37+
`EDIT_CFG_LANGUAGES` | A comma-separated list of languages to include in the build. See [i18n/edit.toml](i18n/edit.toml) for available languages.
38+
3039
## Notes to Package Maintainers
3140

3241
### Package Naming

0 commit comments

Comments
 (0)