Skip to content

Commit 9a23358

Browse files
committed
add changes
1 parent a7cc35a commit 9a23358

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

.changeset/cyan-sloths-move.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"ferric-cli": patch
3+
---
4+
5+
Fixed cargo build release flag

packages/ferric/src/cargo.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@ type BuildOptions = {
7676

7777
export async function build(options: BuildOptions) {
7878
const { target, configuration } = options;
79-
await spawn("cargo", ["build", "--target", target], {
79+
const modeConfig = configuration.toLowerCase() === "release" ? "--release" : "";
80+
await spawn("cargo", ["build", "--target", target, modeConfig], {
8081
outputMode: "buffered",
8182
env: {
8283
...process.env,
@@ -87,7 +88,7 @@ export async function build(options: BuildOptions) {
8788
process.cwd(),
8889
"target",
8990
target,
90-
configuration
91+
modeConfig
9192
);
9293
const dynamicLibraryFile = fs
9394
.readdirSync(targetOutputPath)

0 commit comments

Comments
 (0)