Matt Nelson
01/28/2024, 10:08 AMjava.lang.Process but for native?Behzod
01/28/2024, 11:50 AMProcess in Swift? I think, the core functionality is similar.
https://developer.apple.com/documentation/foundation/processMatt Nelson
01/28/2024, 11:56 AMmacos only unfortunately. Need something that utilizes posix_spawn for iOS tvOS watchOSlouiscad
01/28/2024, 4:18 PMAlex Dmitriev
01/29/2024, 7:44 AMJan Holešovský
01/29/2024, 8:43 AMMatt Nelson
01/29/2024, 10:35 AMMatt Nelson
01/29/2024, 10:37 AMIf you need to start a process, https://github.com/kgit2/kommand/ might help.That is perfect @Alex Dmitriev!!! Unfortunately they do not have a License on their code. Unsure how anyone is using is w/o them having that sad panda
louiscad
01/29/2024, 10:41 AMMatt Nelson
01/29/2024, 10:42 AMLICENSE is blankedlouiscad
01/29/2024, 10:44 AMMatt Nelson
01/29/2024, 10:54 AMglibc, so odds of it working on older linux machines is nill since kotlin uses 2.19 (well, maybe 2.23 for kotlin 1.9.21?) 😢Todd
01/29/2024, 3:28 PMTodd
01/29/2024, 3:28 PMAlex Dmitriev
01/29/2024, 7:18 PMKommand should be a self-contained library since its dependency libkommand_core.a is also a self-contained lib with its dependencies incorporated inside the .a file (configured to be static library in Cargo.toml). Unless I’m missing something, I don’t see a runtime dependency on glibc and guess it should be able to run on older linux boxes?Jan Holešovský
01/29/2024, 8:22 PMtarget_os = "ios"?` for fn posix_spawn() ...Matt Nelson
01/30/2024, 5:26 PMKommand should be a self-contained library since its dependency libkommand_core.a is also a self-contained lib with its dependencies incorporated inside the .a file (configured to be static library in Cargo.toml). Unless I’m missing something, I don’t see a runtime dependency on glibc and guess it should be able to run on older linux boxes?
Yes it is non-intuitive but the self-hosted runner for macos is using latest brew install of cross compilers, and then the rust build files do not specify compiler flag -static-libgcc . So, any libc calls will use whatever is currently on the host.
This is exactly why I built out https://github.com/05nelsonm/build-env , to ensure that at least native linux code was compiled against older versions of libc (and for reproducible builds, ofc).Matt Nelson
01/30/2024, 5:35 PMTechnically yes, but I'm reasonably sure that it won't work on real device, unless it is jailbroken; or at least that was the case some 5 years ago or so when we needed to spawn on iOS & had to find out a different solution in the end... Even the code you pointed me to has `// FIXME:Will have to look into it again, but I remember reading that Apple "eased" that constraint a bit ago b/c they wanted people to be able to develop via?` fortarget_os = "ios"fn posix_spawn()
iPad .
Will let ya know my results for sure.Matt Nelson
02/04/2024, 6:28 PMposix_spawn for iOS (and `Linux`/`macOS` too). Need to put together a working iOS application and try it out on an actual device, but things are a working.
NOTE: executables for darwin must be codesigned (which they are).