diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml
index a04bb5c5..620fdcde 100644
--- a/.github/workflows/rust.yml
+++ b/.github/workflows/rust.yml
@@ -15,20 +15,20 @@ env:
CARGO_TERM_COLOR: always
jobs:
- build-linux:
+ # build-linux:
- runs-on: ubuntu-latest
+ # runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v3
- - name: Build
- shell: pwsh
- run: ./build.ps1 -clippy
- - name: Run tests
- shell: pwsh
- run: ./build.ps1 -test
+ # steps:
+ # - uses: actions/checkout@v3
+ # - name: Build
+ # shell: pwsh
+ # run: ./build.ps1 -clippy
+ # - name: Run tests
+ # shell: pwsh
+ # run: ./build.ps1 -test
- build-musl:
+ build-linux:
runs-on: ubuntu-latest
diff --git a/.pipelines/DSC-Official.yml b/.pipelines/DSC-Official.yml
index 9d00379e..3bc4351a 100644
--- a/.pipelines/DSC-Official.yml
+++ b/.pipelines/DSC-Official.yml
@@ -5,7 +5,7 @@ pr:
branches:
include:
- onebranch
- - release*
+ - release/v*
schedules:
- cron: '0 3 * * 1'
@@ -33,7 +33,7 @@ extends:
template: v2/OneBranch.Official.CrossPlat.yml@onebranchTemplates
parameters:
featureFlags:
- WindowsHostVersion:
+ WindowsHostVersion:
Disk: Large
Version: 2022
Network: KS1 # note that this property is sticky so commenting out will use the previous set one
@@ -59,7 +59,7 @@ extends:
apiscan:
enabled: false
- stages:
+ stages:
- stage: BuildAndSign
displayName: Build Native Binaries
dependsOn: []
@@ -225,61 +225,61 @@ extends:
displayName: 'Create msixbundle'
condition: succeeded()
- - job: BuildLinux
- dependsOn: SetPackageVersion
- variables:
- LinuxContainerImage: 'onebranch.azurecr.io/linux/ubuntu-2204:latest'
- PackageVersion: $[ dependencies.SetPackageVersion.outputs['Package.Version'] ]
- ob_outputDirectory: '$(Build.ArtifactStagingDirectory)'
- displayName: Linux-x64-gnu
- pool:
- type: linux
- steps:
- - task: RustInstaller@1
- inputs:
- rustVersion: ms-stable
- toolchainFeed: https://pkgs.dev.azure.com/mscodehub/Rust/_packaging/Rust/nuget/v3/index.json
- additionalTargets: x86_64-unknown-linux-gnu
- displayName: Install Rust
- env:
- ob_restore_phase: true
- - pwsh: |
- ./build.ps1 -Release -Architecture x86_64-unknown-linux-gnu
- ./build.ps1 -PackageType tgz -Architecture x86_64-unknown-linux-gnu -Release
- Copy-Item ./bin/*.tar.gz "$(ob_outputDirectory)"
- displayName: 'Build x86_64-unknown-linux-gnu'
- condition: succeeded()
+ # - job: BuildLinux
+ # dependsOn: SetPackageVersion
+ # variables:
+ # LinuxContainerImage: 'onebranch.azurecr.io/linux/ubuntu-2204:latest'
+ # PackageVersion: $[ dependencies.SetPackageVersion.outputs['Package.Version'] ]
+ # ob_outputDirectory: '$(Build.ArtifactStagingDirectory)'
+ # displayName: Linux-x64-gnu
+ # pool:
+ # type: linux
+ # steps:
+ # - task: RustInstaller@1
+ # inputs:
+ # rustVersion: ms-stable
+ # toolchainFeed: https://pkgs.dev.azure.com/mscodehub/Rust/_packaging/Rust/nuget/v3/index.json
+ # additionalTargets: x86_64-unknown-linux-gnu
+ # displayName: Install Rust
+ # env:
+ # ob_restore_phase: true
+ # - pwsh: |
+ # ./build.ps1 -Release -Architecture x86_64-unknown-linux-gnu
+ # ./build.ps1 -PackageType tgz -Architecture x86_64-unknown-linux-gnu -Release
+ # Copy-Item ./bin/*.tar.gz "$(ob_outputDirectory)"
+ # displayName: 'Build x86_64-unknown-linux-gnu'
+ # condition: succeeded()
- - job: BuildLinuxArm64
- dependsOn: SetPackageVersion
- variables:
- LinuxContainerImage: 'onebranch.azurecr.io/linux/ubuntu-2004-arm64:latest'
- PackageVersion: $[ dependencies.SetPackageVersion.outputs['Package.Version'] ]
- ob_outputDirectory: '$(Build.ArtifactStagingDirectory)'
- displayName: Linux-ARM64-gnu
- pool:
- type: linux
- hostArchitecture: arm64
- steps:
- - task: RustInstaller@1
- inputs:
- rustVersion: ms-stable
- toolchainFeed: https://pkgs.dev.azure.com/mscodehub/Rust/_packaging/Rust/nuget/v3/index.json
- additionalTargets: aarch64-unknown-linux-gnu
- displayName: Install Rust
- env:
- ob_restore_phase: true
- - pwsh: |
- apt update
- apt -y install gcc-aarch64-linux-gnu
- if ((openssl version -d) -match 'OPENSSLDIR: "(?
.*?)"') {
- $env:OPENSSL_LIB_DIR = $matches['dir']
- }
- ./build.ps1 -Release -Architecture aarch64-unknown-linux-gnu
- ./build.ps1 -PackageType tgz -Architecture aarch64-unknown-linux-gnu -Release
- Copy-Item ./bin/*.tar.gz "$(ob_outputDirectory)"
- displayName: 'Build aarch64-unknown-linux-gnu'
- condition: succeeded()
+ # - job: BuildLinuxArm64
+ # dependsOn: SetPackageVersion
+ # variables:
+ # LinuxContainerImage: 'onebranch.azurecr.io/linux/ubuntu-2004-arm64:latest'
+ # PackageVersion: $[ dependencies.SetPackageVersion.outputs['Package.Version'] ]
+ # ob_outputDirectory: '$(Build.ArtifactStagingDirectory)'
+ # displayName: Linux-ARM64-gnu
+ # pool:
+ # type: linux
+ # hostArchitecture: arm64
+ # steps:
+ # - task: RustInstaller@1
+ # inputs:
+ # rustVersion: ms-stable
+ # toolchainFeed: https://pkgs.dev.azure.com/mscodehub/Rust/_packaging/Rust/nuget/v3/index.json
+ # additionalTargets: aarch64-unknown-linux-gnu
+ # displayName: Install Rust
+ # env:
+ # ob_restore_phase: true
+ # - pwsh: |
+ # apt update
+ # apt -y install gcc-aarch64-linux-gnu
+ # if ((openssl version -d) -match 'OPENSSLDIR: "(?.*?)"') {
+ # $env:OPENSSL_LIB_DIR = $matches['dir']
+ # }
+ # ./build.ps1 -Release -Architecture aarch64-unknown-linux-gnu
+ # ./build.ps1 -PackageType tgz -Architecture aarch64-unknown-linux-gnu -Release
+ # Copy-Item ./bin/*.tar.gz "$(ob_outputDirectory)"
+ # displayName: 'Build aarch64-unknown-linux-gnu'
+ # condition: succeeded()
- job: BuildLinuxMusl
dependsOn: SetPackageVersion
diff --git a/.vscode/settings.json b/.vscode/settings.json
index 54f38dc4..292ec34e 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -25,5 +25,6 @@
"sarif-viewer.connectToGithubCodeScanning": "off",
"vscode-nmake-tools.workspaceBuildDirectories": [
"."
- ]
+ ],
+ "azure-pipelines.1ESPipelineTemplatesSchemaFile": true
}
\ No newline at end of file
diff --git a/build.ps1 b/build.ps1
index c684e652..303c2a0a 100644
--- a/build.ps1
+++ b/build.ps1
@@ -15,7 +15,8 @@ param(
[switch]$UseX64MakeAppx,
[switch]$UseCratesIO,
[switch]$UpdateLockFile,
- [switch]$Audit
+ [switch]$Audit,
+ [switch]$UseCFSAuth
)
if ($GetPackageVersion) {
@@ -197,21 +198,25 @@ if (!$SkipBuild) {
${env:CARGO_SOURCE_crates-io_REPLACE_WITH} = $null
$env:CARGO_REGISTRIES_CRATESIO_INDEX = $null
- if ($null -eq (Get-Command 'az' -ErrorAction Ignore)) {
- throw "Azure CLI not found"
- }
+ if ($UseCFSAuth -or $null -ne $env:TF_BUILD) {
+ if ($null -eq (Get-Command 'az' -ErrorAction Ignore)) {
+ throw "Azure CLI not found"
+ }
- if ($null -ne $env:CARGO_REGISTRIES_POWERSHELL_TOKEN) {
- Write-Host "Using existing token"
- } else {
- Write-Host "Getting token"
- $accessToken = az account get-access-token --query accessToken --resource 499b84ac-1321-427f-aa17-267ca6975798 -o tsv
- if ($LASTEXITCODE -ne 0) {
- Write-Warning "Failed to get access token, use 'az login' first, or use '-useCratesIO' to use crates.io. Proceeding with anonymous access."
- } else {
- $header = "Bearer $accessToken"
- $env:CARGO_REGISTRIES_POWERSHELL_TOKEN = $header
- $env:CARGO_REGISTRIES_POWERSHELL_CREDENTIAL_PROVIDER = 'cargo:token'
+ if ($null -ne (Get-Command az -ErrorAction Ignore)) {
+ Write-Host "Getting token"
+ $accessToken = az account get-access-token --query accessToken --resource 499b84ac-1321-427f-aa17-267ca6975798 -o tsv
+ if ($LASTEXITCODE -ne 0) {
+ Write-Warning "Failed to get access token, use 'az login' first, or use '-useCratesIO' to use crates.io. Proceeding with anonymous access."
+ } else {
+ $header = "Bearer $accessToken"
+ $env:CARGO_REGISTRIES_POWERSHELL_INDEX = "sparse+https://pkgs.dev.azure.com/powershell/PowerShell/_packaging/powershell~force-auth/Cargo/index/"
+ $env:CARGO_REGISTRIES_POWERSHELL_TOKEN = $header
+ $env:CARGO_REGISTRIES_POWERSHELL_CREDENTIAL_PROVIDER = 'cargo:token'
+ }
+ }
+ else {
+ Write-Warning "Azure CLI not found, proceeding with anonymous access."
}
}
}
@@ -661,7 +666,16 @@ if ($packageType -eq 'msixbundle') {
}
}
- $packageName = "DSC-$productVersion-$architecture.tar"
+ # for Linux, we only build musl as its statically linked, so we remove the musl suffix
+ $productArchitecture = if ($architecture -eq 'aarch64-unknown-linux-musl') {
+ 'aarch64-linux'
+ } elseif ($architecture -eq 'x86_64-unknown-linux-musl') {
+ 'x86_64-linux'
+ } else {
+ $architecture
+ }
+
+ $packageName = "DSC-$productVersion-$productArchitecture.tar"
$tarFile = Join-Path $PSScriptRoot 'bin' $packageName
tar cvf $tarFile -C $tgzTarget .
if ($LASTEXITCODE -ne 0) {
diff --git a/dsc/Cargo.lock b/dsc/Cargo.lock
index ef6004e5..be78e463 100644
--- a/dsc/Cargo.lock
+++ b/dsc/Cargo.lock
@@ -469,7 +469,7 @@ dependencies = [
[[package]]
name = "dsc"
-version = "3.0.0-preview.11"
+version = "3.0.0-rc.1"
dependencies = [
"clap",
"clap_complete",
@@ -517,6 +517,7 @@ dependencies = [
"tracing-indicatif",
"tree-sitter",
"tree-sitter-dscexpression",
+ "tree-sitter-rust",
]
[[package]]
@@ -1743,9 +1744,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
[[package]]
name = "tokio"
-version = "1.40.0"
+version = "1.41.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e2b070231665d27ad9ec9b8df639893f46727666c6767db40317fbe920a5d998"
+checksum = "145f3413504347a2be84393cc8a7d2fb4d863b375909ea59f2158261aa258bbb"
dependencies = [
"backtrace",
"bytes",
@@ -1876,6 +1877,7 @@ dependencies = [
"cc",
"tree-sitter",
"tree-sitter-language",
+ "tree-sitter-rust",
]
[[package]]
@@ -1884,6 +1886,16 @@ version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e8ddffe35a0e5eeeadf13ff7350af564c6e73993a24db62caee1822b185c2600"
+[[package]]
+name = "tree-sitter-rust"
+version = "0.23.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cffbbcb780348fbae8395742ae5b34c1fd794e4085d43aac9f259387f9a84dc8"
+dependencies = [
+ "cc",
+ "tree-sitter-language",
+]
+
[[package]]
name = "unicode-bidi"
version = "0.3.17"
diff --git a/dsc/Cargo.toml b/dsc/Cargo.toml
index b0bdd9ca..fe11c4b6 100644
--- a/dsc/Cargo.toml
+++ b/dsc/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "dsc"
-version = "3.0.0-preview.11"
+version = "3.0.0-rc.1"
edition = "2021"
[profile.release]
@@ -11,22 +11,22 @@ opt-level = 2
lto = true
[dependencies]
-clap = { version = "4.5.17", features = ["derive"] }
-clap_complete = { version = "4.5.28" }
-crossterm = { version = "0.28.1" }
-ctrlc = { version = "3.4.0" }
+clap = { version = "4.5", features = ["derive"] }
+clap_complete = { version = "4.5" }
+crossterm = { version = "0.28" }
+ctrlc = { version = "3.4" }
dsc_lib = { path = "../dsc_lib" }
indicatif = { version = "0.17" }
-jsonschema = { version = "0.23.0", default-features = false }
-path-absolutize = { version = "3.1.1" }
+jsonschema = { version = "0.23", default-features = false }
+path-absolutize = { version = "3.1" }
# reqwest = { version = "0.12.8", features = ["native-tls"], default-features = false }
-schemars = { version = "0.8.12" }
-serde = { version = "1.0.210", features = ["derive"] }
-serde_json = { version = "1.0.128", features = ["preserve_order"] }
-serde_yaml = { version = "0.9.3" }
+schemars = { version = "0.8" }
+serde = { version = "1.0", features = ["derive"] }
+serde_json = { version = "1.0", features = ["preserve_order"] }
+serde_yaml = { version = "0.9" }
syntect = { version = "5.0", features = ["default-fancy"], default-features = false }
-sysinfo = { version = "0.32.0" }
-thiserror = "1.0.52"
+sysinfo = { version = "0.32" }
+thiserror = "1.0"
tracing = { version = "0.1.37" }
-tracing-subscriber = { version = "0.3.17", features = ["ansi", "env-filter", "json"] }
-tracing-indicatif = { version = "0.3.6" }
+tracing-subscriber = { version = "0.3", features = ["ansi", "env-filter", "json"] }
+tracing-indicatif = { version = "0.3" }
diff --git a/dsc_lib/Cargo.lock b/dsc_lib/Cargo.lock
index 6ed62eb1..d78785ae 100644
--- a/dsc_lib/Cargo.lock
+++ b/dsc_lib/Cargo.lock
@@ -391,6 +391,7 @@ dependencies = [
"tracing-indicatif",
"tree-sitter",
"tree-sitter-dscexpression",
+ "tree-sitter-rust",
]
[[package]]
@@ -1359,9 +1360,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
[[package]]
name = "tokio"
-version = "1.40.0"
+version = "1.41.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e2b070231665d27ad9ec9b8df639893f46727666c6767db40317fbe920a5d998"
+checksum = "145f3413504347a2be84393cc8a7d2fb4d863b375909ea59f2158261aa258bbb"
dependencies = [
"backtrace",
"bytes",
@@ -1475,6 +1476,7 @@ dependencies = [
"cc",
"tree-sitter",
"tree-sitter-language",
+ "tree-sitter-rust",
]
[[package]]
@@ -1483,6 +1485,16 @@ version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e8ddffe35a0e5eeeadf13ff7350af564c6e73993a24db62caee1822b185c2600"
+[[package]]
+name = "tree-sitter-rust"
+version = "0.23.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cffbbcb780348fbae8395742ae5b34c1fd794e4085d43aac9f259387f9a84dc8"
+dependencies = [
+ "cc",
+ "tree-sitter-language",
+]
+
[[package]]
name = "unicode-bidi"
version = "0.3.17"
diff --git a/dsc_lib/Cargo.toml b/dsc_lib/Cargo.toml
index f4a2cfd7..049dab8b 100644
--- a/dsc_lib/Cargo.toml
+++ b/dsc_lib/Cargo.toml
@@ -3,32 +3,40 @@ name = "dsc_lib"
version = "3.0.0"
edition = "2021"
+[profile.release]
+strip = true
+# optimize for size
+opt-level = 2
+# enable link time optimization to remove dead code
+lto = true
+
[dependencies]
-base64 = "0.22.1"
-chrono = "0.4.26"
-clap = { version = "4.5.17", features = ["derive"] }
-derive_builder ="0.20.1"
-indicatif = "0.17.0"
-jsonschema = { version = "0.23.0", default-features = false }
-linked-hash-map = "0.5.6"
-num-traits = "0.2.14"
-regex = "1.7.0"
+base64 = "0.22"
+chrono = "0.4"
+clap = { version = "4.5", features = ["derive"] }
+derive_builder ="0.20"
+indicatif = "0.17"
+jsonschema = { version = "0.23", default-features = false }
+linked-hash-map = "0.5"
+num-traits = "0.2"
+regex = "1.11"
# reqwest = { version = "0.12.8", features = ["native-tls"], default-features = false }
-schemars = { version = "0.8.12", features = ["preserve_order"] }
-serde = { version = "1.0.210", features = ["derive"] }
-serde_json = { version = "1.0.128", features = ["preserve_order"] }
-serde_yaml = { version = "0.9.3" }
-thiserror = "1.0.0"
+schemars = { version = "0.8", features = ["preserve_order"] }
+serde = { version = "1.0", features = ["derive"] }
+serde_json = { version = "1.0", features = ["preserve_order"] }
+serde_yaml = { version = "0.9" }
+thiserror = "1.0"
security_context_lib = { path = "../security_context_lib" }
-semver = "1.0.0"
-tokio = { version = "1.40.0", features = ["full"] }
-tracing = "0.1.37"
-tracing-indicatif = { version = "0.3.6" }
-tree-sitter = "0.24.3"
+semver = "1.0"
+tokio = { version = "1.41", features = ["full"] }
+tracing = "0.1"
+tracing-indicatif = { version = "0.3" }
+tree-sitter = "0.24"
+tree-sitter-rust = "0.23"
tree-sitter-dscexpression = { path = "../tree-sitter-dscexpression" }
[dev-dependencies]
-serde_yaml = "0.9.3"
+serde_yaml = "0.9"
[build-dependencies]
-cc="1.1.30"
+cc="1.1"
diff --git a/osinfo/Cargo.toml b/osinfo/Cargo.toml
index ad745d3d..f339f9df 100644
--- a/osinfo/Cargo.toml
+++ b/osinfo/Cargo.toml
@@ -3,9 +3,14 @@ name = "osinfo"
version = "0.1.0"
edition = "2021"
-# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
+[profile.release]
+strip = true
+# optimize for size
+opt-level = 2
+# enable link time optimization to remove dead code
+lto = true
[dependencies]
-os_info = { version = "3.7.0" }
-serde = { version = "1.0.0", features = ["derive"] }
-serde_json = { version = "1.0.0", features = ["preserve_order"] }
+os_info = { version = "3.7" }
+serde = { version = "1.0", features = ["derive"] }
+serde_json = { version = "1.0", features = ["preserve_order"] }
diff --git a/pal/Cargo.toml b/pal/Cargo.toml
index 06c821de..a75d6c5b 100644
--- a/pal/Cargo.toml
+++ b/pal/Cargo.toml
@@ -13,4 +13,4 @@ opt-level = 2
lto = true
[build-dependencies]
-cc = "1.1.20"
+cc = "1.1"
diff --git a/process/Cargo.toml b/process/Cargo.toml
index fec2dba2..66d599a7 100644
--- a/process/Cargo.toml
+++ b/process/Cargo.toml
@@ -4,6 +4,6 @@ version = "0.1.0"
edition = "2021"
[dependencies]
-sysinfo = "0.31.2"
-serde = { version = "1.0.0", features = ["derive"] }
-serde_json = { version = "1.0.0", features = ["preserve_order"] }
+sysinfo = "0.31"
+serde = { version = "1.0", features = ["derive"] }
+serde_json = { version = "1.0", features = ["preserve_order"] }
diff --git a/registry/Cargo.toml b/registry/Cargo.toml
index 6a954c97..b8c8a8f6 100644
--- a/registry/Cargo.toml
+++ b/registry/Cargo.toml
@@ -10,20 +10,17 @@ opt-level = 2
# enable link time optimization to remove dead code
lto = true
-[profile.dev]
-lto = true
-
[dependencies]
-clap = { version = "4.5.20", features = ["derive"] }
-crossterm = "0.28.1"
-registry = "1.2.3"
-schemars = "0.8.0"
-serde = "1.0.130"
-serde_json = "1.0.68"
-thiserror = "1.0.64"
-tracing = { version = "0.1.37" }
-tracing-subscriber = { version = "0.3.17", features = ["ansi", "env-filter", "json"] }
-utfx = "0.1.0"
+clap = { version = "4.5", features = ["derive"] }
+crossterm = "0.28"
+registry = "1.2"
+schemars = "0.8"
+serde = "1.0"
+serde_json = "1.0"
+thiserror = "1.0"
+tracing = { version = "0.1" }
+tracing-subscriber = { version = "0.3", features = ["ansi", "env-filter", "json"] }
+utfx = "0.1"
[build-dependencies]
static_vcruntime = "2.0"
diff --git a/runcommandonset/Cargo.toml b/runcommandonset/Cargo.toml
index f61792a5..00d4a998 100644
--- a/runcommandonset/Cargo.toml
+++ b/runcommandonset/Cargo.toml
@@ -3,11 +3,16 @@ name = "runcommandonset"
version = "0.1.0"
edition = "2021"
-# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
+[profile.release]
+strip = true
+# optimize for size
+opt-level = 2
+# enable link time optimization to remove dead code
+lto = true
[dependencies]
-clap = { version = "4.4.0", features = ["derive"] }
-serde = { version = "1.0.0", features = ["derive"] }
-serde_json = { version = "1.0.0", features = ["preserve_order"] }
-tracing = { version = "0.1.37" }
-tracing-subscriber = { version = "0.3.17", features = ["ansi", "env-filter", "json"] }
+clap = { version = "4.4", features = ["derive"] }
+serde = { version = "1.0", features = ["derive"] }
+serde_json = { version = "1.0", features = ["preserve_order"] }
+tracing = { version = "0.1" }
+tracing-subscriber = { version = "0.3", features = ["ansi", "env-filter", "json"] }
diff --git a/security_context_lib/Cargo.toml b/security_context_lib/Cargo.toml
index 9d58ccb2..75184245 100644
--- a/security_context_lib/Cargo.toml
+++ b/security_context_lib/Cargo.toml
@@ -3,8 +3,15 @@ name = "security_context_lib"
version = "0.1.0"
edition = "2021"
+[profile.release]
+strip = true
+# optimize for size
+opt-level = 2
+# enable link time optimization to remove dead code
+lto = true
+
[target.'cfg(target_os = "windows")'.dependencies]
-is_elevated = "0.1.0"
+is_elevated = "0.1"
[target.'cfg(not(target_os = "windows"))'.dependencies]
-nix = { version = "0.29.0", features = ["user"] }
+nix = { version = "0.29", features = ["user"] }
diff --git a/tools/test_group_resource/Cargo.lock b/tools/test_group_resource/Cargo.lock
index 1b4df837..9775a5e8 100644
--- a/tools/test_group_resource/Cargo.lock
+++ b/tools/test_group_resource/Cargo.lock
@@ -391,6 +391,7 @@ dependencies = [
"tracing-indicatif",
"tree-sitter",
"tree-sitter-dscexpression",
+ "tree-sitter-rust",
]
[[package]]
@@ -1370,9 +1371,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
[[package]]
name = "tokio"
-version = "1.40.0"
+version = "1.41.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e2b070231665d27ad9ec9b8df639893f46727666c6767db40317fbe920a5d998"
+checksum = "145f3413504347a2be84393cc8a7d2fb4d863b375909ea59f2158261aa258bbb"
dependencies = [
"backtrace",
"bytes",
@@ -1486,6 +1487,7 @@ dependencies = [
"cc",
"tree-sitter",
"tree-sitter-language",
+ "tree-sitter-rust",
]
[[package]]
@@ -1494,6 +1496,16 @@ version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e8ddffe35a0e5eeeadf13ff7350af564c6e73993a24db62caee1822b185c2600"
+[[package]]
+name = "tree-sitter-rust"
+version = "0.23.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cffbbcb780348fbae8395742ae5b34c1fd794e4085d43aac9f259387f9a84dc8"
+dependencies = [
+ "cc",
+ "tree-sitter-language",
+]
+
[[package]]
name = "unicode-bidi"
version = "0.3.17"
diff --git a/tree-sitter-dscexpression/Cargo.lock b/tree-sitter-dscexpression/Cargo.lock
index d6afaa84..0e3d508f 100644
--- a/tree-sitter-dscexpression/Cargo.lock
+++ b/tree-sitter-dscexpression/Cargo.lock
@@ -28,9 +28,9 @@ checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3"
[[package]]
name = "regex"
-version = "1.11.0"
+version = "1.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "38200e5ee88914975b69f657f0801b6f6dccafd44fd9326302a4aaeecfacb1d8"
+checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191"
dependencies = [
"aho-corasick",
"memchr",
@@ -87,6 +87,7 @@ dependencies = [
"cc",
"tree-sitter",
"tree-sitter-language",
+ "tree-sitter-rust",
]
[[package]]
@@ -94,3 +95,13 @@ name = "tree-sitter-language"
version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e8ddffe35a0e5eeeadf13ff7350af564c6e73993a24db62caee1822b185c2600"
+
+[[package]]
+name = "tree-sitter-rust"
+version = "0.23.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cffbbcb780348fbae8395742ae5b34c1fd794e4085d43aac9f259387f9a84dc8"
+dependencies = [
+ "cc",
+ "tree-sitter-language",
+]
diff --git a/tree-sitter-dscexpression/Cargo.toml b/tree-sitter-dscexpression/Cargo.toml
index a085a5ae..689dbfc8 100644
--- a/tree-sitter-dscexpression/Cargo.toml
+++ b/tree-sitter-dscexpression/Cargo.toml
@@ -5,7 +5,7 @@ version = "1.0.0"
keywords = ["incremental", "parsing", "DSCExpression"]
categories = ["parsing", "text-editors"]
repository = "https://github.com/powershell/dsc"
-edition = "2018"
+edition = "2021"
license = "MIT"
build = "bindings/rust/build.rs"
@@ -19,9 +19,17 @@ include = [
[lib]
path = "bindings/rust/lib.rs"
+[profile.release]
+strip = true
+# optimize for size
+opt-level = 2
+# enable link time optimization to remove dead code
+lto = true
+
[dependencies]
-tree-sitter = "0.24.3"
-tree-sitter-language = "0.1.2"
+tree-sitter-rust = "0.23"
+tree-sitter = "0.24"
+tree-sitter-language = "0.1"
[build-dependencies]
-cc = "1.1.29"
+cc = "1.1"
diff --git a/y2j/Cargo.toml b/y2j/Cargo.toml
index c0729cfc..7e65656f 100644
--- a/y2j/Cargo.toml
+++ b/y2j/Cargo.toml
@@ -3,6 +3,13 @@ name = "y2j"
version = "1.0.0"
edition = "2021"
+[profile.release]
+strip = true
+# optimize for size
+opt-level = 2
+# enable link time optimization to remove dead code
+lto = true
+
[dependencies]
serde_json = { version = "1.0.0", features = ["preserve_order"] }
serde_yaml = { version = "0.9.3" }