Skip to content

Commit c4adbe1

Browse files
prathikrPrathik Rao
andauthored
[sdk_v2] enables framework-dependent js winml scenario (#449)
* baiju * bootstrap * flc ver * flc ver --------- Co-authored-by: Prathik Rao <prathikrao@microsoft.com>
1 parent 9af5a80 commit c4adbe1

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

sdk_v2/js/script/install.cjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ const CORE_FEED = useNightly ? ORT_NIGHTLY_FEED : NUGET_FEED;
5555
const ARTIFACTS = [
5656
{
5757
name: useWinML ? 'Microsoft.AI.Foundry.Local.Core.WinML' : 'Microsoft.AI.Foundry.Local.Core',
58-
version: useNightly ? undefined : useWinML ? '0.9.0.7-dev.20260209T090407.b5352143' : '0.9.0.8-dev.20260209T090216.b5352143', // Set later using resolveLatestVersion if undefined
58+
version: useNightly ? undefined : useWinML ? '0.9.0.194-dev-20260220T213816-a79d8a61' : '0.9.0.8-dev.20260209T090216.b5352143', // Set later using resolveLatestVersion if undefined
5959
feed: ORT_NIGHTLY_FEED
6060
},
6161
{

sdk_v2/js/src/detail/coreInterop.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,14 @@ export class CoreInterop {
5252
const corePath = path.join(packageDir, `Microsoft.AI.Foundry.Local.Core${ext}`);
5353
if (fs.existsSync(corePath)) {
5454
config.params['FoundryLocalCorePath'] = corePath;
55+
56+
// Auto-detect if WinML Bootstrap is needed by checking for Bootstrap DLL in FoundryLocalCorePath
57+
const bootstrapDllPath = path.join(packageDir, 'Microsoft.WindowsAppRuntime.Bootstrap.dll');
58+
if (fs.existsSync(bootstrapDllPath)) {
59+
// WinML Bootstrap DLL found, enable bootstrapping
60+
config.params['Bootstrap'] = 'true';
61+
}
62+
5563
return corePath;
5664
}
5765

@@ -72,6 +80,7 @@ export class CoreInterop {
7280
if (process.platform === 'win32') {
7381
koffi.load(path.join(coreDir, `onnxruntime${ext}`));
7482
koffi.load(path.join(coreDir, `onnxruntime-genai${ext}`));
83+
process.env.PATH = `${coreDir};${process.env.PATH}`;
7584
}
7685
this.lib = koffi.load(corePath);
7786

0 commit comments

Comments
 (0)