Skip to content

Commit 6bf2375

Browse files
fix: include dev generated rust custom functions in rust wasm32-wasip1 build (#515)
Signed-off-by: David Dal Busco <david.dalbusco@outlook.com>
1 parent d22ba8a commit 6bf2375

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

src/services/functions/build/build.rust.services.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import {
1313
SATELLITE_DID_FILE
1414
} from '../../../constants/build.constants';
1515
import {
16+
DEPLOY_SPUTNIK_FUNCTIONS_PATH,
1617
DEPLOY_SPUTNIK_SCRIPT_PATH,
1718
JUNO_ACTION_PROJECT_PATH,
1819
JUNO_PACKAGE_JSON_PATH,
@@ -103,7 +104,12 @@ export const buildRust = async ({
103104
const env = {
104105
...process.env,
105106
RUSTFLAGS: rustFlags,
106-
...(target === 'wasm32-wasip1' && {DEV_SCRIPT_PATH: DEPLOY_SPUTNIK_SCRIPT_PATH})
107+
...(target === 'wasm32-wasip1' && {
108+
DEV_SCRIPT_PATH: DEPLOY_SPUTNIK_SCRIPT_PATH,
109+
...(existsSync(DEPLOY_SPUTNIK_FUNCTIONS_PATH) && {
110+
DEV_FUNCTIONS_PATH: DEPLOY_SPUTNIK_FUNCTIONS_PATH
111+
})
112+
})
107113
};
108114

109115
await execute({

0 commit comments

Comments
 (0)