MIRROR: javascript for ๐Ÿœ's, a tiny runtime with big ambitions
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

add 'suffix' to example

+4 -4
+4 -4
examples/ffi/basic/printf.js
··· 1 - import { dlopen, FFIType } from 'ant:ffi'; 1 + import { dlopen, suffix, FFIType } from 'ant:ffi'; 2 2 3 3 let libcName; 4 4 if (process.platform === 'darwin') { 5 - libcName = 'libSystem.dylib'; 5 + libcName = `libSystem.${suffix}`; 6 6 } else if (process.platform === 'linux') { 7 - libcName = 'libc.so.6'; 7 + libcName = `libc.${suffix}`; 8 8 } else if (process.platform === 'win32') { 9 - libcName = 'msvcrt.dll'; 9 + libcName = `msvcrt.${suffix}`; 10 10 } else { 11 11 throw new Error(`Unsupported platform: ${process.platform}`); 12 12 }