I saw Haxemin, but did not test it yet, it seems fairly efficient, but:
Don't you thinklike me that it would be great feature to have minification/obfuscation handled by compiler itself?
doing it with the compiler instead of target tools, or even HaxeMin which is middle solution would
It's very important feature today, for the js output in web, but also for the size of mobile apps we want to distribute.
And obfucation is a way to protect against reverse engineering.
Like compiler is the best to give auto completion informations, it will also be the best to do minification / obfuscation job.
what do you think?
not so easy because of Reflect feature of haxe!
Thanks for bringing this up! I use this thread as opportunity to add a question: Will Haxe 3.2 have a different JavaScript output? While the current JavaScript syntax is pretty straight forward and easy to debug, it's minified versions result in still quite big files. Of course it's not that much of a problem if gzip for .js files is activated on the server side but we would like to add some optimizations later... I think one of the problems (for example) is the output of the full namespace for each static property (see enums) or the __name__ array for each class.
@back2dos good to know about -D js_flattenbut it does not resolve issue with Reflect for Google closure right?
and i don't think a haxe minifier / obfuscator would mean duplicate Google closure efforts, because we still can have a second pass for js target with it.
Am i the only one thinking that it would also be usefull for any other target of haxe, like for mobile apps? (or tv!)
Would generating Google Closure annotations be the solution?
Provided you can make your code compatible with full dce, Closure advanced optimisation will practically obfuscate your code.
--
To post to this group haxe...@googlegroups.com
http://groups.google.com/group/haxelang?hl=en
---You received this message because you are subscribed to the Google Groups "Haxe" group.
For more options, visit https://groups.google.com/d/optout.
For the record mt, do use its own obfuscation tools for yeaaaaars now, sidelong haxe, so there is no fundamental problem here or hostility to obfuscation.
The haxe team can help you if you need to make things compatible with your obfuscation flow but won t mix compiler and obfuscation out of the box for now Those are two different problems,so we leave the obfuscation problems up to users.
If you need help with the compiler because it actually prevent an obfuscation technology to be implemented, please file an issue :)
Hi,
Regarding Reflect you could take a look at :
http://yal.cc/introducing-haxmin/ and https://github.com/yellowafterlife/haxmin
Here is an obfuscation flow that could work:
merge and mangle js files with uglifyjs then use HaxMin. Obviously you'll have to update the whitelist HaxMin uses but that should not be a problem.
Current tests have shown promising results so far with merging big js libs (jquery, pixijs) with my haxe generated js file and then using HaxMin.
I need to research a little further though but it could give you ideas 
IMHO I don't think obfuscation should be a compiler feature.
++
François Nicaise
http://www.linkedin.com/in/fnicaise
www.francoisnicaise.fr
Freelance Game Developer / Designer
Business Relations @ FrenchCows
Gaming & Business @ Bordeaux Games
-- -- François Nicaise https://www.linkedin.com/in/fnicaise