How to build dar without including source code
App Development2 posts231 viewsLast activity Nov 2022
TU
TuranOP
Nov 2022Is there a flag or way to build a .dar file without including the source code in it. e.g. excluding the .daml files.
If not since the dar file is just an archive is there any adverse effect to removing all .daml files before uploading the dar to a ledger.
CO
cocreature
Nov 2022There is no flag for this at the moment but you can manually remove them from the DAR if you want without any effect. The ledger only cares about the manifest and the .dalf files referenced from the manifest.
Keep in mind though that Daml-LF is deliberately not intended to obfuscate your code: Parties that interact with a template should know what they’re interacting with.