This is a slightly modified version of the original repo at: https://github.com/maciej-irl/objc_rust. This modification runs JXA (JavaScript for Automation) from rust by way of ObjC.
-
Take your desired JXA payload and base64 encode it. Example:
cat [filename].js | base64 | pbcopy
-
edit the
mycode
variable inobjc/sample.m
and paste in the base64 encoded JXA payload. -
cd to the parent dir of this repo and run:
cargo run
-
JXA will be executed and anything written to stdout will be returned.