@dbx-tools/projen 0.6.188 → 0.6.192
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.ts +1 -1
- package/package.json +4 -4
- package/src/project-rs.ts +23 -1
- package/tasks/bump.ts +10 -0
- package/tasks/uniffi-release.mjs +9 -1
- package/tasks/uniffi.ts +1 -0
package/index.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// Hand edits are overwritten on the next watch; this file is read-only.
|
|
4
4
|
|
|
5
5
|
export const PACKAGE_IDENTIFIER = "@dbx-tools/projen";
|
|
6
|
-
export const PACKAGE_VERSION = "0.6.
|
|
6
|
+
export const PACKAGE_VERSION = "0.6.191";
|
|
7
7
|
export * as barrels from "./src/barrels.ts";
|
|
8
8
|
export * as bunApp from "./src/bun-app.ts";
|
|
9
9
|
export * as bunWorkflow from "./src/bun-workflow.ts";
|
package/package.json
CHANGED
|
@@ -25,9 +25,9 @@
|
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@clack/prompts": "^1.7.0",
|
|
28
|
-
"@dbx-tools/core": "0.6.
|
|
29
|
-
"@dbx-tools/path": "0.6.
|
|
30
|
-
"@dbx-tools/shared-core": "0.6.
|
|
28
|
+
"@dbx-tools/core": "0.6.192",
|
|
29
|
+
"@dbx-tools/path": "0.6.192",
|
|
30
|
+
"@dbx-tools/shared-core": "0.6.192",
|
|
31
31
|
"commander": "^15.0.0",
|
|
32
32
|
"concurrently": "^10.0.3",
|
|
33
33
|
"constructs": "^10.6.0",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
},
|
|
48
48
|
"main": "index.ts",
|
|
49
49
|
"license": "Apache-2.0",
|
|
50
|
-
"version": "0.6.
|
|
50
|
+
"version": "0.6.192",
|
|
51
51
|
"types": "index.ts",
|
|
52
52
|
"type": "module",
|
|
53
53
|
"exports": {
|
package/src/project-rs.ts
CHANGED
|
@@ -163,6 +163,14 @@ export const UNIFFI_RELEASE_TARGETS: readonly UniFFIReleaseTarget[] = [
|
|
|
163
163
|
os: RustReleaseOs.WINDOWS,
|
|
164
164
|
cpu: RustReleaseCpu.X64,
|
|
165
165
|
},
|
|
166
|
+
{
|
|
167
|
+
runner: "windows-11-vs2026-arm",
|
|
168
|
+
cargo: "aarch64-pc-windows-msvc",
|
|
169
|
+
node: "win32-arm64-msvc",
|
|
170
|
+
python: "win_arm64",
|
|
171
|
+
os: RustReleaseOs.WINDOWS,
|
|
172
|
+
cpu: RustReleaseCpu.ARM64,
|
|
173
|
+
},
|
|
166
174
|
] as const;
|
|
167
175
|
|
|
168
176
|
const RUST_CACHE_ENV = {
|
|
@@ -685,6 +693,7 @@ export class DBXToolsRustWorkspace {
|
|
|
685
693
|
dbxToolsProject.dbxToolsConfig.rust = this.workspaceMapping;
|
|
686
694
|
}
|
|
687
695
|
project.gitignore.addPatterns(
|
|
696
|
+
"!/Cargo.lock",
|
|
688
697
|
"target/",
|
|
689
698
|
...this.bindingMappings.flatMap((binding) => [
|
|
690
699
|
...(binding.node ? [`${binding.node}/src/*${binding.crate.replaceAll("-", "_")}.*`] : []),
|
|
@@ -808,6 +817,18 @@ export class DBXToolsRustWorkspace {
|
|
|
808
817
|
new TextFile(project, "Cargo.toml", {
|
|
809
818
|
lines: renderToml(generatedWorkspaceManifest).trimEnd().split("\n"),
|
|
810
819
|
});
|
|
820
|
+
new TextFile(project, ".cargo/config.toml", {
|
|
821
|
+
lines: renderToml({
|
|
822
|
+
"target.x86_64-pc-windows-msvc": {
|
|
823
|
+
rustflags: ["-C", "target-feature=+crt-static"],
|
|
824
|
+
},
|
|
825
|
+
"target.aarch64-pc-windows-msvc": {
|
|
826
|
+
rustflags: ["-C", "target-feature=+crt-static"],
|
|
827
|
+
},
|
|
828
|
+
})
|
|
829
|
+
.trimEnd()
|
|
830
|
+
.split("\n"),
|
|
831
|
+
});
|
|
811
832
|
project.addTask("rs:format", { exec: "cargo fmt --all" });
|
|
812
833
|
project.addTask("rs:lint", { exec: "cargo clippy --workspace --all-targets --all-features" });
|
|
813
834
|
project.addTask("rs:test", { exec: "cargo test --workspace" });
|
|
@@ -871,6 +892,7 @@ export class DBXToolsRustWorkspace {
|
|
|
871
892
|
return { ...target, ...(hasReleaseExclusions ? { cargoExcludes } : {}) };
|
|
872
893
|
});
|
|
873
894
|
const hasPythonBindings = bindings.some((binding) => binding.python);
|
|
895
|
+
const usesCargoLock = existsSync(join(project.outdir, "Cargo.lock"));
|
|
874
896
|
const usePreinstalledWindowsRust = releaseRustVersion === "stable";
|
|
875
897
|
const hasTargetOutputs =
|
|
876
898
|
bindings.length > 0 || releaseBinaries.length > 0 || publicCrates.length > 0;
|
|
@@ -1048,7 +1070,7 @@ export class DBXToolsRustWorkspace {
|
|
|
1048
1070
|
},
|
|
1049
1071
|
run: timedBash(
|
|
1050
1072
|
"rust_workspace",
|
|
1051
|
-
`cargo build --release --workspace --target "\${{ matrix.cargo }}"${
|
|
1073
|
+
`cargo build --release --workspace${usesCargoLock ? " --locked" : ""} --target "\${{ matrix.cargo }}"${
|
|
1052
1074
|
hasReleaseExclusions ? " ${{ matrix.cargoExcludes }}" : ""
|
|
1053
1075
|
}`,
|
|
1054
1076
|
),
|
package/tasks/bump.ts
CHANGED
|
@@ -315,6 +315,16 @@ program
|
|
|
315
315
|
stdin: "ignore",
|
|
316
316
|
check: true,
|
|
317
317
|
});
|
|
318
|
+
if (existsSync(join(root, "Cargo.toml"))) {
|
|
319
|
+
logger.info("refreshing Cargo.lock workspace versions");
|
|
320
|
+
exec.spawnSync("cargo", ["metadata", "--format-version", "1", "--no-deps"], {
|
|
321
|
+
cwd: process.cwd(),
|
|
322
|
+
stdout: "ignore",
|
|
323
|
+
stderr: "inherit",
|
|
324
|
+
stdin: "ignore",
|
|
325
|
+
check: true,
|
|
326
|
+
});
|
|
327
|
+
}
|
|
318
328
|
}
|
|
319
329
|
|
|
320
330
|
if (opts.commit) {
|
package/tasks/uniffi-release.mjs
CHANGED
|
@@ -494,7 +494,15 @@ const build = () => {
|
|
|
494
494
|
rmSync(output, { recursive: true, force: true });
|
|
495
495
|
mkdirSync(output, { recursive: true });
|
|
496
496
|
if (!parsed.values["skip-build"]) {
|
|
497
|
-
run("cargo", [
|
|
497
|
+
run("cargo", [
|
|
498
|
+
"build",
|
|
499
|
+
"--release",
|
|
500
|
+
...(existsSync(resolve(root, "Cargo.lock")) ? ["--locked"] : []),
|
|
501
|
+
"--package",
|
|
502
|
+
crate,
|
|
503
|
+
"--target",
|
|
504
|
+
cargoTarget,
|
|
505
|
+
]);
|
|
498
506
|
}
|
|
499
507
|
if (!existsSync(library)) throw new Error(`Missing native library ${library}`);
|
|
500
508
|
|
package/tasks/uniffi.ts
CHANGED