Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions entitlements/node.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<!-- Required for V8 JIT compilation -->
<key>com.apple.security.cs.allow-jit</key>
<true/>
<!-- Required for V8 to generate unsigned executable code -->
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
<true/>
<!-- Required for V8 memory page management -->
<key>com.apple.security.cs.disable-executable-page-protection</key>
<true/>
<!-- Required for loading native modules -->
<key>com.apple.security.cs.disable-library-validation</key>
<true/>
</dict>
</plist>
13 changes: 12 additions & 1 deletion forge.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,18 @@ const config: ForgeConfig = {
extraResource: [ './wp-files', './assets', './bin', './dist/cli' ],
executableName: process.platform === 'linux' ? 'studio' : undefined,
icon: './assets/studio-app-icon',
osxSign: {},
osxSign: {
optionsForFile: ( filePath ) => {
// The bundled Node binary requires specific entitlements for V8 JIT compilation.
// Without these, V8 crashes with SIGTRAP when trying to allocate executable memory.
if ( filePath.endsWith( 'bin/node' ) ) {
return {
entitlements: path.join( __dirname, 'entitlements', 'node.plist' ),
};
}
return {};
},
},
ignore: [
// Exclude major development directories
/^\/\..*/, // All dotfiles and dot directories
Expand Down