The stuff mentioned above is for fabric the fray check and stop thread i don t think it will hold up if it gets wet.
Edge finish carpet.
Binding is typically the easiest and least expensive method of finishing a carpet edge.
Place your carpet face down on your work surface.
Just place a bead along the edge where it is fraying.
One of the methods that you can use to finish off the edge of a piece of carpet is to simply attach it to a tack strip.
Cut any protruding edges straight or to the shape you want your rug.
Staple along the edge.
This is going to be the most basic method and many installers like to do it this way.
Pull the edge of the carpet back 1 to 2 feet so you can see the underlying subfloor which may be concrete or plywood.
Step 3 measure the width of the doorway using a tape measure and then cut a carpet tack strip to the same width using tin snips.
Binding the edge of a carpet involves wrapping a strip of fabric which is generally made from either polyester or cotton around the edge of the carpet and stitching it in place.
This is done by a carpet binding machine.
I would say glue hot glue or a marine glue.
With this method you are going to need to use your knee kicker in order to make sure that the edge of the carpet has a good stretch on it.
Check straightness of the remnant edge with the measuring tape and marker marking on the back side of the rug any areas that need to be trimmed with scissors.
Place the cloth along the edge on top of the pile so the edge of the pile and the edge of the cloth are together.
If you are using the staple gun plate idea you would put your metal plate under the carpet and staple down the edge.