Here is a light weight approach, using no packages, and not even picture environment.
\documentclass{article}
\newcommand{\myarrow}[1][1cm]{\mathrel{%
\hbox{\rule[\dimexpr\fontdimen22\textfont2-.2pt\relax]{#1}{.4pt}}%
\mkern-4mu\hbox{\usefont{U}{lasy}{m}{n}\symbol{41}}}}
\makeatletter
\setbox0\hbox{$\xdef\scriptratio{\strip@pt\dimexpr
\numexpr(\sf@size*65536)/\f@size sp}$}
\newcommand{\myscriptarrow}[1][1cm]{{%
\hbox{\rule[\scriptratio\dimexpr\fontdimen22\textfont2-.2pt\relax]
{\scriptratio\dimexpr#1\relax}{\scriptratio\dimexpr.4pt\relax}}%
\mkern-4mu\hbox{\let\f@size\sf@size\usefont{U}{lasy}{m}{n}\symbol{41}}}}
\makeatother
\begin{document}
\[x-a\myarrow b_{c\myscriptarrow d-e}-f\]
\[x-a\myarrow[.5cm] b_{c\myscriptarrow[.5cm] d-e}-f\]
\[x-a\myarrow[1mm] b_{c\myscriptarrow[1mm] d-e}-f\]
\end{document}

As in other answers it implements @BarbaraBeeton's suggestion of using the arrow head in the lasy fonts. The length parameter or \myscriptarrow is automatically scaled, so it should be same as for \myarrow.
Equivalent result is obtained via shorter code which employs \vcenter:
\documentclass{article}
\newcommand{\myarrow}[1][1cm]{\mathrel{%
\vcenter{\hbox{\rule[-.2pt]{#1}{.4pt}}}%
\mkern-4mu\hbox{\usefont{U}{lasy}{m}{n}\symbol{41}}}}
\makeatletter
\setbox0\hbox{$\xdef\scriptratio{\strip@pt\dimexpr
\numexpr(\sf@size*65536)/\f@size sp}$}
\newcommand{\myscriptarrow}[1][1cm]{{%
\vcenter{\hbox{\rule[\scriptratio\dimexpr-.2pt\relax]
{\scriptratio\dimexpr#1\relax}{\scriptratio\dimexpr.4pt\relax}}}%
\mkern-4mu\hbox{\let\f@size\sf@size\usefont{U}{lasy}{m}{n}\symbol{41}}}}
\makeatother
\begin{document}
\[x-a\myarrow b_{c\myscriptarrow d-e}-f\]
\[x-a\myarrow[.5cm] b_{c\myscriptarrow[.5cm] d-e}-f\]
\[x-a\myarrow[1mm] b_{c\myscriptarrow[1mm] d-e}-f\]
\end{document}
The \myscriptarrow could use \mathrel. The sole effect (in script style for which it is destined) would be to suppress the small space separating from alarge symbol (\sum, \prod, ...) either immediately preceding or following.
The code for \myscriptarrow can be simplified if one removes the two \scriptratio which scale the rule thickness and vertical shift for centering (the one scaling the width must stay).
A better choice perhaps for the thickness is to use \fontdimen8 of the extension font.
\documentclass{article}
\newcommand{\myarrow}[1][1cm]{\mathrel{%
\vcenter{\hbox{\rule[-.5\fontdimen8\textfont3]{#1}{\fontdimen8\textfont3}}}%
\mkern-4mu\hbox{\usefont{U}{lasy}{m}{n}\symbol{41}}}}
\makeatletter
\setbox0\hbox{$\xdef\scriptratio{\strip@pt\dimexpr
\numexpr(\sf@size*65536)/\f@size sp}$}
\newcommand{\myscriptarrow}[1][1cm]{{%
\vcenter{\hbox{\rule[-.5\fontdimen8\scriptfont3]
{\scriptratio\dimexpr#1\relax}{\fontdimen8\scriptfont3}}}%
\mkern-4mu\hbox{\let\f@size\sf@size\usefont{U}{lasy}{m}{n}\symbol{41}}}}
\makeatother
\begin{document}
\[x-a\myarrow b_{c\myscriptarrow d-e}-f\]
\[x-a\myarrow[.5cm] b_{c\myscriptarrow[.5cm] d-e}-f\]
\[x-a\myarrow[1mm] b_{c\myscriptarrow[1mm] d-e}-f\]
\end{document}

\xrightarrow{\hspace{2cm}}(requiresamsmath) which gives an arrow a bit longer than 2cm. Do you know about\longrightarrow? – egreg Sep 28 '15 at 14:12\rightarrowI will try the solution with\xrightarrow– Amelio Vazquez-Reina Sep 28 '15 at 14:25