Skip to content

Using L10N in a library and a binary #5

Closed Answered by MathieuTricoire
IzawGithub asked this question in Q&A
Discussion options

You must be logged in to vote

Sorry for the late answer, I didn't find a solution to what you're asking for.

I tried using build scripts to pass env. var but they are passed to all targets, I would be surprised there is not a way to do that with cargo but I didn't find how for now.

I would try in the future to add an environment var like L10N_PATH that could be set like what it's done in the env_logger crate L10N_PATH=[target][=][path][,...] so we could do something like L10N_PATH=binary_target_name=l10n_bin,library_target_name=l10n_lib.
And maybe go a little bit further in situation where the binary and the library have the same name, specifying the target "type" as a prefix for disambiguation, that would give someth…

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by IzawGithub
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants