flexible library usage in generated code