To date, when humans have gone to space, they have brought with them all the air they needed to breathe, their water and their food. All wastes created were either flushed into space or returned to Earth in their original form. We can use machines to recycle urine and water vapor in the air to produce drinkable water, but it will eventually become more desirable and economical to recycle our human wastes naturally rather than only by machines, and to do so naturally in conjunction with food production. Machines would be used only to sterilize and purify water that has already been cycled thru the artificial biosphere.
Plants emit oxygen as a waste.
That completes the animal-plant cycle. In this cyclic manner, animals and plants are mutually dependent upon each other. Plants produce both food and oxygen for animals. In turn, animals produce carbon dioxide for plants. In addition, animals produce excrement wastes which enrich the soil.