EnchantEnchant is a static ability, written “Enchant [object or player].” The enchant ability restricts what an Aura spell can target and what an Aura can enchant.
For more information about Auras, see rule 303, “Enchantments.”
If an Aura has multiple instances of enchant, all of them apply. The Aura’s target must follow the restrictions from all the instances of enchant. The Aura can enchant only objects or players that match all of its enchant abilities.
Auras that can enchant a player can target and be attached to players. Such Auras can’t target permanents and can’t be attached to permanents. (CR 702.5) your library
Enchanted library is an artifact creature on the battlefield with power and toughness each equal to the number of cards in it. It's still a library.
If enchanted library would leave the battlefield,
exileTo exile an object, move it to the exile zone from wherever it is. See rule 406, “Exile.” (CR 701.13) this Aura instead.