Couple of things:
1. More info of other libraries you're using would be helpful and where is the primitive coming from (a nav arg?). For example if you use AAC ViewModels + hilt + AAC navigation can inject argument primitives on your behalf that you can access via savedStateHandle. With no work to do on your end! I just implemented this recently and it's super convenient!
2. Inject a primitive at compile time? You can create a qualifier annotation for the primitive, or use the @Named qualifier to give the primitive a name and you can provide it that way.
3. Most likely though you shouldn't inject primitives/data classes, you should inject "services". So maybe you have some kind of MyPrimitiveProviderService which has a bunch of primitives, and therefore you can just inject that entire type instead of just a single primitive.
4. If you want to provide values at runtime, then that is not currently possible. "Hilt does not support assisted injection (values provided at runtime):"
https://github.com/google/dagger/issues/2287
Sorry for the long answer, but yeah. Depending on whether you are using AAC VM, hilt or dagger, AAC navigation will change the answer a bit I think. Also, if you are looking for runtime or compile time injection then the answer also changes.
Note: I'm not an expert at dagger. The above info just comes from my experience recently with dagger.