Defold has draw line (meant for debugging).
msg.post("@render:", "draw_line", { start_point = vmath.vector3(0, 0, 0), end_point = vmath.vector3(1000, 1000, 0), color = vmath.vector4(1, 1, 1, 1) } )
There is now Draw Pixels (Native Extension) too.