Rules2CP is a general purpose rule-based modeling language for constraint programming. It aims at making constraint programming technology easier to use by non-programmers, by modeling combinatorial optimization problems with logical rules and elementary data structures, and by allowing the building of Rules2CP libraries for specific problems. The Packing Knowledge Modeling Language PKML is such a library developed in the framework of the European Net-WMS project for higher-dimensional bin packing problems taking into account extra placement constraints and specific industrial requirements. The Rules2CP compiler transforms Rules2CP statements into constraint programs in different target systems, currently Sicstus-Prolog and Choco-Java. The Rules2CP compiler is implemented in Sicstus Prolog.