diff options
author | Jade Lovelace <lix@jade.fyi> | 2024-08-11 20:55:24 -0700 |
---|---|---|
committer | jade <lix@jade.fyi> | 2024-08-21 17:09:10 +0000 |
commit | dba615098d3d28fdb3339e244a4aec778d269e85 (patch) | |
tree | 9764c3e73c9aa818a7793b087382b7cc3999f4e0 /src | |
parent | e38410799b5b78b2fc2b0c9e4b1dc0dfc5801097 (diff) |
build: move to a Cargo workspace
This is purely to let Cargo's dependency resolver do stuff for us, we do
not actually intend to build this stuff with Cargo to begin with.
Change-Id: I4c08d55595c7c27b7096375022581e1e34308a87
Diffstat (limited to 'src')
-rw-r--r-- | src/lix-doc/Cargo.lock | 95 | ||||
-rw-r--r-- | src/lix-doc/Cargo.toml | 3 | ||||
-rw-r--r-- | src/lix-doc/meson.build | 27 |
3 files changed, 0 insertions, 125 deletions
diff --git a/src/lix-doc/Cargo.lock b/src/lix-doc/Cargo.lock deleted file mode 100644 index e82e138f5..000000000 --- a/src/lix-doc/Cargo.lock +++ /dev/null @@ -1,95 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 3 - -[[package]] -name = "autocfg" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" - -[[package]] -name = "countme" -version = "3.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7704b5fdd17b18ae31c4c1da5a2e0305a2bf17b5249300a9ee9ed7b72114c636" - -[[package]] -name = "dissimilar" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86e3bdc80eee6e16b2b6b0f87fbc98c04bee3455e35174c0de1a125d0688c632" - -[[package]] -name = "expect-test" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30d9eafeadd538e68fb28016364c9732d78e420b9ff8853fa5e4058861e9f8d3" -dependencies = [ - "dissimilar", - "once_cell", -] - -[[package]] -name = "hashbrown" -version = "0.14.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" - -[[package]] -name = "lix-doc" -version = "0.0.1" -dependencies = [ - "expect-test", - "rnix", - "rowan", -] - -[[package]] -name = "memoffset" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a" -dependencies = [ - "autocfg", -] - -[[package]] -name = "once_cell" -version = "1.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" - -[[package]] -name = "rnix" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb35cedbeb70e0ccabef2a31bcff0aebd114f19566086300b8f42c725fc2cb5f" -dependencies = [ - "rowan", -] - -[[package]] -name = "rowan" -version = "0.15.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32a58fa8a7ccff2aec4f39cc45bf5f985cec7125ab271cf681c279fd00192b49" -dependencies = [ - "countme", - "hashbrown", - "memoffset", - "rustc-hash", - "text-size", -] - -[[package]] -name = "rustc-hash" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" - -[[package]] -name = "text-size" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f18aa187839b2bdb1ad2fa35ead8c4c2976b64e4363c386d45ac0f7ee85c9233" diff --git a/src/lix-doc/Cargo.toml b/src/lix-doc/Cargo.toml index 3f8ded0f7..02494862f 100644 --- a/src/lix-doc/Cargo.toml +++ b/src/lix-doc/Cargo.toml @@ -8,9 +8,6 @@ license = "BSD-2-Clause OR MIT" homepage = "https://github.com/lf-/nix-doc" repository = "https://github.com/lf-/nix-doc" -[lib] -crate_type = ["staticlib"] - [dependencies] rnix = "0.11.0" # Necessary because rnix fails to export a critical trait (Rowan's AstNode). diff --git a/src/lix-doc/meson.build b/src/lix-doc/meson.build index 36a5d8ba4..2fa7381a1 100644 --- a/src/lix-doc/meson.build +++ b/src/lix-doc/meson.build @@ -1,30 +1,3 @@ -# Until Meson 1.5ยน, we can't just give Meson a Cargo.lock file and be done with it. -# Meson will *detect* what dependencies are needed from Cargo files; it just won't -# fetch them. The Meson 1.5 feature essentially internally translates Cargo.lock entries -# to .wrap files, and that translation is incredibly straightforward, so let's just -# use a simple Python script to generate the .wrap files ourselves while we wait for -# Meson 1.5. Weirdly, it seems Meson will only detect dependencies from other -# dependency() calls, so we have to specify lix-doc's two top-level dependencies, -# rnix and rowan, manually, and then their dependencies will be recursively translated -# into more dependency() calls. -# -# When Meson translates a Cargo dependency, the string passed to `dependency()` follows -# a fixed format, which is important as the .wrap files' basenames must match the string -# passed to `dependency()` exactly. -# In Meson 1.4, this format is `$packageName-rs`. Meson 1.5 changes this to -# `$packageName-$shortenedVersionString-rs`, because of course it does, but we'll cross -# that bridge when we get there... -# -# [1]: https://github.com/mesonbuild/meson/commit/9b8378985dbdc0112d11893dd42b33b7bc8d1e62 - -run_command( - python, - meson.project_source_root() / 'meson/cargo-lock-to-wraps.py', - meson.current_source_dir() / 'Cargo.lock', - meson.project_source_root() / 'subprojects', - check : true, -) - # The external crate rowan has an ambiguous pointer comparison warning, which # we don't want to fail our whole build if werror is on. subproject('rowan-rs', default_options : ['werror=false']) |