Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS environment variable support #120

Merged
merged 7 commits into from
Aug 5, 2020

Conversation

Jasper-Bekkers
Copy link

This is quite hacky; but it enables the metal debug layer (by default). This same code could be used to add other environment variables.

Probably shouldn't be merged as-is.

@kali
Copy link
Collaborator

kali commented Aug 5, 2020

Mmm.. is this a way to set arbitrary env variables for the app process on the device ? Because IIRC dinghy expose a more or less generic way to do that from configuration that we never managed to get working for iOS through lldb... Could we consider binding it to this trick ?

@Jasper-Bekkers
Copy link
Author

Yeah this is the way to set regular environment variables on iOS processes through lldb so you should be able to use this for that.

@kali
Copy link
Collaborator

kali commented Aug 5, 2020

It looks relatively straightforward if you feel like doing the patch, all in dinghy-lib/src/ios/device.rs: _envs is ignore in one or two places and should be pass down to the function that generates the lldb script...

@Jasper-Bekkers
Copy link
Author

I can take a quick look.

@Jasper-Bekkers
Copy link
Author

I think these changes ought to do it (at least for me they give me the right env vars now when launching for example with --env={"RUST_BACKTRACE=1","TEST=23"}).

@Jasper-Bekkers Jasper-Bekkers changed the title Metal debug layer iOS environment variable support Aug 5, 2020
@kali kali merged commit 051e470 into sonos:main Aug 5, 2020
@kali
Copy link
Collaborator

kali commented Aug 5, 2020

0.4.39 pushed ! enjoy ! thanks for the patch !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants