diff --git a/Text/Highlighting/Kate/Syntax.hs b/Text/Highlighting/Kate/Syntax.hs
--- a/Text/Highlighting/Kate/Syntax.hs
+++ b/Text/Highlighting/Kate/Syntax.hs
@@ -91,6 +91,7 @@
 import qualified Text.Highlighting.Kate.Syntax.Relaxngcompact as Relaxngcompact
 import qualified Text.Highlighting.Kate.Syntax.Rhtml as Rhtml
 import qualified Text.Highlighting.Kate.Syntax.Ruby as Ruby
+import qualified Text.Highlighting.Kate.Syntax.Rust as Rust
 import qualified Text.Highlighting.Kate.Syntax.Scala as Scala
 import qualified Text.Highlighting.Kate.Syntax.Scheme as Scheme
 import qualified Text.Highlighting.Kate.Syntax.Sci as Sci
@@ -112,11 +113,11 @@
 
 -- | List of supported languages.
 languages :: [String]
-languages = ["Actionscript","Ada","Alert","Alert_indent","Apache","Asn1","Asp","Awk","Bash","Bibtex","Boo","C","Changelog","Clojure","Cmake","Coffee","Coldfusion","Commonlisp","Cpp","Cs","Css","Curry","D","Diff","Djangotemplate","Doxygen","Doxygenlua","Dtd","Eiffel","Email","Erlang","Fortran","Fsharp","Gnuassembler","Go","Haskell","Haxe","Html","Ini","Java","Javadoc","Javascript","Json","Jsp","Julia","Latex","Lex","LiterateCurry","LiterateHaskell","Lua","Makefile","Mandoc","Matlab","Maxima","Metafont","Mips","Modula2","Modula3","Monobasic","Nasm","Noweb","Objectivec","Objectivecpp","Ocaml","Octave","Pascal","Perl","Php","Pike","Postscript","Prolog","Python","R","Relaxngcompact","Rhtml","Ruby","Scala","Scheme","Sci","Sed","Sgml","Sql","SqlMysql","SqlPostgresql","Tcl","Texinfo","Verilog","Vhdl","Xml","Xorg","Xslt","Xul","Yacc","Yaml"]
+languages = ["Actionscript","Ada","Alert","Alert_indent","Apache","Asn1","Asp","Awk","Bash","Bibtex","Boo","C","Changelog","Clojure","Cmake","Coffee","Coldfusion","Commonlisp","Cpp","Cs","Css","Curry","D","Diff","Djangotemplate","Doxygen","Doxygenlua","Dtd","Eiffel","Email","Erlang","Fortran","Fsharp","Gnuassembler","Go","Haskell","Haxe","Html","Ini","Java","Javadoc","Javascript","Json","Jsp","Julia","Latex","Lex","LiterateCurry","LiterateHaskell","Lua","Makefile","Mandoc","Matlab","Maxima","Metafont","Mips","Modula2","Modula3","Monobasic","Nasm","Noweb","Objectivec","Objectivecpp","Ocaml","Octave","Pascal","Perl","Php","Pike","Postscript","Prolog","Python","R","Relaxngcompact","Rhtml","Ruby","Rust","Scala","Scheme","Sci","Sed","Sgml","Sql","SqlMysql","SqlPostgresql","Tcl","Texinfo","Verilog","Vhdl","Xml","Xorg","Xslt","Xul","Yacc","Yaml"]
 
 -- | List of language extensions.
 languageExtensions :: [(String, String)]
-languageExtensions = [("Actionscript", Actionscript.syntaxExtensions), ("Ada", Ada.syntaxExtensions), ("Alert", Alert.syntaxExtensions), ("Alert_indent", Alert_indent.syntaxExtensions), ("Apache", Apache.syntaxExtensions), ("Asn1", Asn1.syntaxExtensions), ("Asp", Asp.syntaxExtensions), ("Awk", Awk.syntaxExtensions), ("Bash", Bash.syntaxExtensions), ("Bibtex", Bibtex.syntaxExtensions), ("Boo", Boo.syntaxExtensions), ("C", C.syntaxExtensions), ("Changelog", Changelog.syntaxExtensions), ("Clojure", Clojure.syntaxExtensions), ("Cmake", Cmake.syntaxExtensions), ("Coffee", Coffee.syntaxExtensions), ("Coldfusion", Coldfusion.syntaxExtensions), ("Commonlisp", Commonlisp.syntaxExtensions), ("Cpp", Cpp.syntaxExtensions), ("Cs", Cs.syntaxExtensions), ("Css", Css.syntaxExtensions), ("Curry", Curry.syntaxExtensions), ("D", D.syntaxExtensions), ("Diff", Diff.syntaxExtensions), ("Djangotemplate", Djangotemplate.syntaxExtensions), ("Doxygen", Doxygen.syntaxExtensions), ("Doxygenlua", Doxygenlua.syntaxExtensions), ("Dtd", Dtd.syntaxExtensions), ("Eiffel", Eiffel.syntaxExtensions), ("Email", Email.syntaxExtensions), ("Erlang", Erlang.syntaxExtensions), ("Fortran", Fortran.syntaxExtensions), ("Fsharp", Fsharp.syntaxExtensions), ("Gnuassembler", Gnuassembler.syntaxExtensions), ("Go", Go.syntaxExtensions), ("Haskell", Haskell.syntaxExtensions), ("Haxe", Haxe.syntaxExtensions), ("Html", Html.syntaxExtensions), ("Ini", Ini.syntaxExtensions), ("Java", Java.syntaxExtensions), ("Javadoc", Javadoc.syntaxExtensions), ("Javascript", Javascript.syntaxExtensions), ("Json", Json.syntaxExtensions), ("Jsp", Jsp.syntaxExtensions), ("Julia", Julia.syntaxExtensions), ("Latex", Latex.syntaxExtensions), ("Lex", Lex.syntaxExtensions), ("LiterateCurry", LiterateCurry.syntaxExtensions), ("LiterateHaskell", LiterateHaskell.syntaxExtensions), ("Lua", Lua.syntaxExtensions), ("Makefile", Makefile.syntaxExtensions), ("Mandoc", Mandoc.syntaxExtensions), ("Matlab", Matlab.syntaxExtensions), ("Maxima", Maxima.syntaxExtensions), ("Metafont", Metafont.syntaxExtensions), ("Mips", Mips.syntaxExtensions), ("Modula2", Modula2.syntaxExtensions), ("Modula3", Modula3.syntaxExtensions), ("Monobasic", Monobasic.syntaxExtensions), ("Nasm", Nasm.syntaxExtensions), ("Noweb", Noweb.syntaxExtensions), ("Objectivec", Objectivec.syntaxExtensions), ("Objectivecpp", Objectivecpp.syntaxExtensions), ("Ocaml", Ocaml.syntaxExtensions), ("Octave", Octave.syntaxExtensions), ("Pascal", Pascal.syntaxExtensions), ("Perl", Perl.syntaxExtensions), ("Php", Php.syntaxExtensions), ("Pike", Pike.syntaxExtensions), ("Postscript", Postscript.syntaxExtensions), ("Prolog", Prolog.syntaxExtensions), ("Python", Python.syntaxExtensions), ("R", R.syntaxExtensions), ("Relaxngcompact", Relaxngcompact.syntaxExtensions), ("Rhtml", Rhtml.syntaxExtensions), ("Ruby", Ruby.syntaxExtensions), ("Scala", Scala.syntaxExtensions), ("Scheme", Scheme.syntaxExtensions), ("Sci", Sci.syntaxExtensions), ("Sed", Sed.syntaxExtensions), ("Sgml", Sgml.syntaxExtensions), ("Sql", Sql.syntaxExtensions), ("SqlMysql", SqlMysql.syntaxExtensions), ("SqlPostgresql", SqlPostgresql.syntaxExtensions), ("Tcl", Tcl.syntaxExtensions), ("Texinfo", Texinfo.syntaxExtensions), ("Verilog", Verilog.syntaxExtensions), ("Vhdl", Vhdl.syntaxExtensions), ("Xml", Xml.syntaxExtensions), ("Xorg", Xorg.syntaxExtensions), ("Xslt", Xslt.syntaxExtensions), ("Xul", Xul.syntaxExtensions), ("Yacc", Yacc.syntaxExtensions), ("Yaml", Yaml.syntaxExtensions)]
+languageExtensions = [("Actionscript", Actionscript.syntaxExtensions), ("Ada", Ada.syntaxExtensions), ("Alert", Alert.syntaxExtensions), ("Alert_indent", Alert_indent.syntaxExtensions), ("Apache", Apache.syntaxExtensions), ("Asn1", Asn1.syntaxExtensions), ("Asp", Asp.syntaxExtensions), ("Awk", Awk.syntaxExtensions), ("Bash", Bash.syntaxExtensions), ("Bibtex", Bibtex.syntaxExtensions), ("Boo", Boo.syntaxExtensions), ("C", C.syntaxExtensions), ("Changelog", Changelog.syntaxExtensions), ("Clojure", Clojure.syntaxExtensions), ("Cmake", Cmake.syntaxExtensions), ("Coffee", Coffee.syntaxExtensions), ("Coldfusion", Coldfusion.syntaxExtensions), ("Commonlisp", Commonlisp.syntaxExtensions), ("Cpp", Cpp.syntaxExtensions), ("Cs", Cs.syntaxExtensions), ("Css", Css.syntaxExtensions), ("Curry", Curry.syntaxExtensions), ("D", D.syntaxExtensions), ("Diff", Diff.syntaxExtensions), ("Djangotemplate", Djangotemplate.syntaxExtensions), ("Doxygen", Doxygen.syntaxExtensions), ("Doxygenlua", Doxygenlua.syntaxExtensions), ("Dtd", Dtd.syntaxExtensions), ("Eiffel", Eiffel.syntaxExtensions), ("Email", Email.syntaxExtensions), ("Erlang", Erlang.syntaxExtensions), ("Fortran", Fortran.syntaxExtensions), ("Fsharp", Fsharp.syntaxExtensions), ("Gnuassembler", Gnuassembler.syntaxExtensions), ("Go", Go.syntaxExtensions), ("Haskell", Haskell.syntaxExtensions), ("Haxe", Haxe.syntaxExtensions), ("Html", Html.syntaxExtensions), ("Ini", Ini.syntaxExtensions), ("Java", Java.syntaxExtensions), ("Javadoc", Javadoc.syntaxExtensions), ("Javascript", Javascript.syntaxExtensions), ("Json", Json.syntaxExtensions), ("Jsp", Jsp.syntaxExtensions), ("Julia", Julia.syntaxExtensions), ("Latex", Latex.syntaxExtensions), ("Lex", Lex.syntaxExtensions), ("LiterateCurry", LiterateCurry.syntaxExtensions), ("LiterateHaskell", LiterateHaskell.syntaxExtensions), ("Lua", Lua.syntaxExtensions), ("Makefile", Makefile.syntaxExtensions), ("Mandoc", Mandoc.syntaxExtensions), ("Matlab", Matlab.syntaxExtensions), ("Maxima", Maxima.syntaxExtensions), ("Metafont", Metafont.syntaxExtensions), ("Mips", Mips.syntaxExtensions), ("Modula2", Modula2.syntaxExtensions), ("Modula3", Modula3.syntaxExtensions), ("Monobasic", Monobasic.syntaxExtensions), ("Nasm", Nasm.syntaxExtensions), ("Noweb", Noweb.syntaxExtensions), ("Objectivec", Objectivec.syntaxExtensions), ("Objectivecpp", Objectivecpp.syntaxExtensions), ("Ocaml", Ocaml.syntaxExtensions), ("Octave", Octave.syntaxExtensions), ("Pascal", Pascal.syntaxExtensions), ("Perl", Perl.syntaxExtensions), ("Php", Php.syntaxExtensions), ("Pike", Pike.syntaxExtensions), ("Postscript", Postscript.syntaxExtensions), ("Prolog", Prolog.syntaxExtensions), ("Python", Python.syntaxExtensions), ("R", R.syntaxExtensions), ("Relaxngcompact", Relaxngcompact.syntaxExtensions), ("Rhtml", Rhtml.syntaxExtensions), ("Ruby", Ruby.syntaxExtensions), ("Rust", Rust.syntaxExtensions), ("Scala", Scala.syntaxExtensions), ("Scheme", Scheme.syntaxExtensions), ("Sci", Sci.syntaxExtensions), ("Sed", Sed.syntaxExtensions), ("Sgml", Sgml.syntaxExtensions), ("Sql", Sql.syntaxExtensions), ("SqlMysql", SqlMysql.syntaxExtensions), ("SqlPostgresql", SqlPostgresql.syntaxExtensions), ("Tcl", Tcl.syntaxExtensions), ("Texinfo", Texinfo.syntaxExtensions), ("Verilog", Verilog.syntaxExtensions), ("Vhdl", Vhdl.syntaxExtensions), ("Xml", Xml.syntaxExtensions), ("Xorg", Xorg.syntaxExtensions), ("Xslt", Xslt.syntaxExtensions), ("Xul", Xul.syntaxExtensions), ("Yacc", Yacc.syntaxExtensions), ("Yaml", Yaml.syntaxExtensions)]
 
 -- | Returns a list of languages appropriate for the given file extension.
 languagesByExtension :: String -> [String]
@@ -132,7 +133,7 @@
 -- extension (if unique).
 -- The parsers read the input lazily and parse line by line;
 -- results are returned immediately.
--- Supported languages: @actionscript@, @ada@, @alert@, @alert_indent@, @apache@, @asn1@, @asp@, @awk@, @bash@, @bibtex@, @boo@, @c@, @changelog@, @clojure@, @cmake@, @coffee@, @coldfusion@, @commonlisp@, @cpp@, @cs@, @css@, @curry@, @d@, @diff@, @djangotemplate@, @doxygen@, @doxygenlua@, @dtd@, @eiffel@, @email@, @erlang@, @fortran@, @fsharp@, @gnuassembler@, @go@, @haskell@, @haxe@, @html@, @ini@, @java@, @javadoc@, @javascript@, @json@, @jsp@, @julia@, @latex@, @lex@, @literatecurry@, @literatehaskell@, @lua@, @makefile@, @mandoc@, @matlab@, @maxima@, @metafont@, @mips@, @modula2@, @modula3@, @monobasic@, @nasm@, @noweb@, @objectivec@, @objectivecpp@, @ocaml@, @octave@, @pascal@, @perl@, @php@, @pike@, @postscript@, @prolog@, @python@, @r@, @relaxngcompact@, @rhtml@, @ruby@, @scala@, @scheme@, @sci@, @sed@, @sgml@, @sql@, @sqlmysql@, @sqlpostgresql@, @tcl@, @texinfo@, @verilog@, @vhdl@, @xml@, @xorg@, @xslt@, @xul@, @yacc@, @yaml@.
+-- Supported languages: @actionscript@, @ada@, @alert@, @alert_indent@, @apache@, @asn1@, @asp@, @awk@, @bash@, @bibtex@, @boo@, @c@, @changelog@, @clojure@, @cmake@, @coffee@, @coldfusion@, @commonlisp@, @cpp@, @cs@, @css@, @curry@, @d@, @diff@, @djangotemplate@, @doxygen@, @doxygenlua@, @dtd@, @eiffel@, @email@, @erlang@, @fortran@, @fsharp@, @gnuassembler@, @go@, @haskell@, @haxe@, @html@, @ini@, @java@, @javadoc@, @javascript@, @json@, @jsp@, @julia@, @latex@, @lex@, @literatecurry@, @literatehaskell@, @lua@, @makefile@, @mandoc@, @matlab@, @maxima@, @metafont@, @mips@, @modula2@, @modula3@, @monobasic@, @nasm@, @noweb@, @objectivec@, @objectivecpp@, @ocaml@, @octave@, @pascal@, @perl@, @php@, @pike@, @postscript@, @prolog@, @python@, @r@, @relaxngcompact@, @rhtml@, @ruby@, @rust@, @scala@, @scheme@, @sci@, @sed@, @sgml@, @sql@, @sqlmysql@, @sqlpostgresql@, @tcl@, @texinfo@, @verilog@, @vhdl@, @xml@, @xorg@, @xslt@, @xul@, @yacc@, @yaml@.
 highlightAs :: String         -- ^ Language syntax (e.g. "haskell") or extension (e.g. "hs").
             -> String         -- ^ Source code to highlight
             -> [SourceLine]   -- ^ List of highlighted source lines
@@ -220,6 +221,7 @@
         "relaxngcompact" -> Relaxngcompact.highlight
         "rhtml" -> Rhtml.highlight
         "ruby" -> Ruby.highlight
+        "rust" -> Rust.highlight
         "scala" -> Scala.highlight
         "scheme" -> Scheme.highlight
         "sci" -> Sci.highlight
diff --git a/Text/Highlighting/Kate/Syntax/Rust.hs b/Text/Highlighting/Kate/Syntax/Rust.hs
new file mode 100644
--- /dev/null
+++ b/Text/Highlighting/Kate/Syntax/Rust.hs
@@ -0,0 +1,168 @@
+{- This module was generated from data in the Kate syntax
+   highlighting file rust.xml, version 0.4.0, by  -}
+
+module Text.Highlighting.Kate.Syntax.Rust
+          (highlight, parseExpression, syntaxName, syntaxExtensions)
+where
+import Text.Highlighting.Kate.Types
+import Text.Highlighting.Kate.Common
+import Text.ParserCombinators.Parsec hiding (State)
+import Control.Monad.State
+import Data.Char (isSpace)
+import qualified Data.Set as Set
+
+-- | Full name of language.
+syntaxName :: String
+syntaxName = "Rust"
+
+-- | Filename extensions for this language.
+syntaxExtensions :: String
+syntaxExtensions = "*.rs;*.rc"
+
+-- | Highlight source code using this syntax definition.
+highlight :: String -> [SourceLine]
+highlight input = evalState (mapM parseSourceLine $ lines input) startingState
+
+parseSourceLine :: String -> State SyntaxState SourceLine
+parseSourceLine = mkParseSourceLine parseExpression
+
+-- | Parse an expression using appropriate local context.
+parseExpression :: KateParser Token
+parseExpression = do
+  (lang,cont) <- currentContext
+  result <- parseRules (lang,cont)
+  optional $ do eof
+                updateState $ \st -> st{ synStPrevChar = '\n' }
+                pEndLine
+  return result
+
+startingState = SyntaxState {synStContexts = [("Rust","Normal")], synStLineNumber = 0, synStPrevChar = '\n', synStPrevNonspace = False, synStCaseSensitive = True, synStKeywordCaseSensitive = True, synStCaptures = []}
+
+pEndLine = do
+  updateState $ \st -> st{ synStPrevNonspace = False }
+  context <- currentContext
+  contexts <- synStContexts `fmap` getState
+  if length contexts >= 2
+    then case context of
+      ("Rust","Normal") -> return ()
+      ("Rust","Function") -> return ()
+      ("Rust","Type") -> return ()
+      ("Rust","String") -> return ()
+      ("Rust","Character") -> (popContext) >> pEndLine
+      ("Rust","Commentar 1") -> (popContext) >> pEndLine
+      ("Rust","Commentar 2") -> return ()
+      _ -> return ()
+    else return ()
+
+withAttribute attr txt = do
+  when (null txt) $ fail "Parser matched no text"
+  updateState $ \st -> st { synStPrevChar = last txt
+                          , synStPrevNonspace = synStPrevNonspace st || not (all isSpace txt) }
+  return (attr, txt)
+
+list_fn = Set.fromList $ words $ "fn"
+list_type = Set.fromList $ words $ "type"
+list_keywords = Set.fromList $ words $ "as assert break const copy do drop else enum export extern fail for if impl let log loop match mod move mut priv pub pure ref return static struct trait unsafe use while"
+list_types = Set.fromList $ words $ "bool int uint i8 i16 i32 i64 u8 u16 u32 u64 f32 f64 float char str Either Option Result"
+list_ctypes = Set.fromList $ words $ "c_float c_double c_void FILE fpos_t DIR dirent c_char c_schar c_uchar c_short c_ushort c_int c_uint c_long c_ulong size_t ptrdiff_t clock_t time_t c_longlong c_ulonglong intptr_t uintptr_t off_t dev_t ino_t pid_t mode_t ssize_t"
+list_self = Set.fromList $ words $ "self"
+list_constants = Set.fromList $ words $ "true false Some None Left Right Ok Err Success Failure Cons Nil"
+list_cconstants = Set.fromList $ words $ "EXIT_FAILURE EXIT_SUCCESS RAND_MAX EOF SEEK_SET SEEK_CUR SEEK_END _IOFBF _IONBF _IOLBF BUFSIZ FOPEN_MAX FILENAME_MAX L_tmpnam TMP_MAX O_RDONLY O_WRONLY O_RDWR O_APPEND O_CREAT O_EXCL O_TRUNC S_IFIFO S_IFCHR S_IFBLK S_IFDIR S_IFREG S_IFMT S_IEXEC S_IWRITE S_IREAD S_IRWXU S_IXUSR S_IWUSR S_IRUSR F_OK R_OK W_OK X_OK STDIN_FILENO STDOUT_FILENO STDERR_FILENO"
+
+regex_0x'5b0'2d9a'2dfA'2dF'5f'5d'2b'28u8'7cu16'7cu32'7cu64'7ci8'7ci16'7ci32'7ci64'7cu'7ci'29'3f = compileRegex "0x[0-9a-fA-F_]+(u8|u16|u32|u64|i8|i16|i32|i64|u|i)?"
+regex_0b'5b0'2d1'5f'5d'2b'28u8'7cu16'7cu32'7cu64'7ci8'7ci16'7ci32'7ci64'7cu'7ci'29'3f = compileRegex "0b[0-1_]+(u8|u16|u32|u64|i8|i16|i32|i64|u|i)?"
+regex_'5b0'2d9'5d'5b0'2d9'5f'5d'2a'5c'2e'5b0'2d9'5f'5d'2a'28'5beE'5d'5b'2b'2d'5d'3f'5b0'2d9'5f'5d'2b'29'3f'28f32'7cf64'7cf'29'3f = compileRegex "[0-9][0-9_]*\\.[0-9_]*([eE][+-]?[0-9_]+)?(f32|f64|f)?"
+regex_'5b0'2d9'5d'5b0'2d9'5f'5d'2a'28u8'7cu16'7cu32'7cu64'7ci8'7ci16'7ci32'7ci64'7cu'7ci'29'3f = compileRegex "[0-9][0-9_]*(u8|u16|u32|u64|i8|i16|i32|i64|u|i)?"
+regex_'5ba'2dzA'2dZ'5f'5d'5ba'2dzA'2dZ0'2d9'5f'5d'2a'3a'3a = compileRegex "[a-zA-Z_][a-zA-Z0-9_]*::"
+
+parseRules ("Rust","Normal") =
+  (((pDetectSpaces >>= withAttribute NormalTok))
+   <|>
+   ((pKeyword " \n\t.():!+,-<=>%&*/;?[]^{|}~\\" list_fn >>= withAttribute KeywordTok) >>~ pushContext ("Rust","Function"))
+   <|>
+   ((pKeyword " \n\t.():!+,-<=>%&*/;?[]^{|}~\\" list_type >>= withAttribute KeywordTok) >>~ pushContext ("Rust","Type"))
+   <|>
+   ((pKeyword " \n\t.():!+,-<=>%&*/;?[]^{|}~\\" list_keywords >>= withAttribute KeywordTok))
+   <|>
+   ((pKeyword " \n\t.():!+,-<=>%&*/;?[]^{|}~\\" list_types >>= withAttribute KeywordTok))
+   <|>
+   ((pKeyword " \n\t.():!+,-<=>%&*/;?[]^{|}~\\" list_ctypes >>= withAttribute NormalTok))
+   <|>
+   ((pKeyword " \n\t.():!+,-<=>%&*/;?[]^{|}~\\" list_self >>= withAttribute KeywordTok))
+   <|>
+   ((pKeyword " \n\t.():!+,-<=>%&*/;?[]^{|}~\\" list_constants >>= withAttribute KeywordTok))
+   <|>
+   ((pKeyword " \n\t.():!+,-<=>%&*/;?[]^{|}~\\" list_cconstants >>= withAttribute NormalTok))
+   <|>
+   ((pDetect2Chars False '/' '/' >>= withAttribute CommentTok) >>~ pushContext ("Rust","Commentar 1"))
+   <|>
+   ((pDetect2Chars False '/' '*' >>= withAttribute CommentTok) >>~ pushContext ("Rust","Commentar 2"))
+   <|>
+   ((pRegExpr regex_0x'5b0'2d9a'2dfA'2dF'5f'5d'2b'28u8'7cu16'7cu32'7cu64'7ci8'7ci16'7ci32'7ci64'7cu'7ci'29'3f >>= withAttribute DecValTok))
+   <|>
+   ((pRegExpr regex_0b'5b0'2d1'5f'5d'2b'28u8'7cu16'7cu32'7cu64'7ci8'7ci16'7ci32'7ci64'7cu'7ci'29'3f >>= withAttribute DecValTok))
+   <|>
+   ((pRegExpr regex_'5b0'2d9'5d'5b0'2d9'5f'5d'2a'5c'2e'5b0'2d9'5f'5d'2a'28'5beE'5d'5b'2b'2d'5d'3f'5b0'2d9'5f'5d'2b'29'3f'28f32'7cf64'7cf'29'3f >>= withAttribute DecValTok))
+   <|>
+   ((pRegExpr regex_'5b0'2d9'5d'5b0'2d9'5f'5d'2a'28u8'7cu16'7cu32'7cu64'7ci8'7ci16'7ci32'7ci64'7cu'7ci'29'3f >>= withAttribute DecValTok))
+   <|>
+   ((pRegExpr regex_'5ba'2dzA'2dZ'5f'5d'5ba'2dzA'2dZ0'2d9'5f'5d'2a'3a'3a >>= withAttribute NormalTok))
+   <|>
+   ((pDetectChar False '{' >>= withAttribute NormalTok))
+   <|>
+   ((pDetectChar False '}' >>= withAttribute NormalTok))
+   <|>
+   ((pDetectChar False '"' >>= withAttribute StringTok) >>~ pushContext ("Rust","String"))
+   <|>
+   ((pDetectChar False '\'' >>= withAttribute CharTok) >>~ pushContext ("Rust","Character"))
+   <|>
+   ((pDetectIdentifier >>= withAttribute NormalTok))
+   <|>
+   (currentContext >>= \x -> guard (x == ("Rust","Normal")) >> pDefault >>= withAttribute NormalTok))
+
+parseRules ("Rust","Function") =
+  (((pDetectSpaces >>= withAttribute NormalTok))
+   <|>
+   ((pDetectChar False '(' >>= withAttribute NormalTok) >>~ (popContext))
+   <|>
+   ((pDetectChar False '<' >>= withAttribute NormalTok) >>~ (popContext))
+   <|>
+   (currentContext >>= \x -> guard (x == ("Rust","Function")) >> pDefault >>= withAttribute NormalTok))
+
+parseRules ("Rust","Type") =
+  (((pDetectSpaces >>= withAttribute NormalTok))
+   <|>
+   ((pDetectChar False '=' >>= withAttribute NormalTok) >>~ (popContext))
+   <|>
+   ((pDetectChar False '<' >>= withAttribute NormalTok) >>~ (popContext))
+   <|>
+   (currentContext >>= \x -> guard (x == ("Rust","Type")) >> pDefault >>= withAttribute NormalTok))
+
+parseRules ("Rust","String") =
+  (((pLineContinue >>= withAttribute StringTok))
+   <|>
+   ((pHlCStringChar >>= withAttribute CharTok))
+   <|>
+   ((pDetectChar False '"' >>= withAttribute StringTok) >>~ (popContext))
+   <|>
+   (currentContext >>= \x -> guard (x == ("Rust","String")) >> pDefault >>= withAttribute StringTok))
+
+parseRules ("Rust","Character") =
+  (((pHlCStringChar >>= withAttribute CharTok))
+   <|>
+   ((pDetectChar False '\'' >>= withAttribute CharTok) >>~ (popContext))
+   <|>
+   (currentContext >>= \x -> guard (x == ("Rust","Character")) >> pDefault >>= withAttribute CharTok))
+
+parseRules ("Rust","Commentar 1") =
+  (currentContext >>= \x -> guard (x == ("Rust","Commentar 1")) >> pDefault >>= withAttribute CommentTok)
+
+parseRules ("Rust","Commentar 2") =
+  (((pDetectSpaces >>= withAttribute CommentTok))
+   <|>
+   ((pDetect2Chars False '*' '/' >>= withAttribute CommentTok) >>~ (popContext))
+   <|>
+   (currentContext >>= \x -> guard (x == ("Rust","Commentar 2")) >> pDefault >>= withAttribute CommentTok))
+
+
+parseRules x = parseRules ("Rust","Normal") <|> fail ("Unknown context" ++ show x)
diff --git a/changelog b/changelog
--- a/changelog
+++ b/changelog
@@ -1,3 +1,7 @@
+highlighting-kate 0.5.3.8 (05 Mar 2013)
+
+  * Support mozilla rust.
+
 highlighting-kate 0.5.3.7 (20 Feb 2013)
 
   * Bumped version bound on blaze-html to 0.7.
diff --git a/highlighting-kate.cabal b/highlighting-kate.cabal
--- a/highlighting-kate.cabal
+++ b/highlighting-kate.cabal
@@ -1,5 +1,5 @@
 Name:                highlighting-kate
-Version:             0.5.3.7
+Version:             0.5.3.8
 Cabal-Version:       >= 1.10
 Build-Type:          Simple
 Category:            Text
@@ -105,6 +105,7 @@
                      xml/relaxngcompact.xml
                      xml/rhtml.xml
                      xml/ruby.xml
+                     xml/rust.xml
                      xml/scala.xml
                      xml/scheme.xml
                      xml/sci.xml
@@ -232,6 +233,7 @@
                      Text.Highlighting.Kate.Syntax.Relaxngcompact
                      Text.Highlighting.Kate.Syntax.Rhtml
                      Text.Highlighting.Kate.Syntax.Ruby
+                     Text.Highlighting.Kate.Syntax.Rust
                      Text.Highlighting.Kate.Syntax.Scala
                      Text.Highlighting.Kate.Syntax.Scheme
                      Text.Highlighting.Kate.Syntax.Sci
diff --git a/xml/rust.xml b/xml/rust.xml
new file mode 100644
--- /dev/null
+++ b/xml/rust.xml
@@ -0,0 +1,233 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE language SYSTEM "language.dtd">
+<language name="Rust" version="0.4.0" kateversion="2.4" section="Sources" extensions="*.rs;*.rc" mimetype="text/x-rust" priority="15">
+<highlighting>
+	<list name="fn">
+		<item> fn </item>
+	</list>
+	<list name="type">
+		<item> type </item>
+	</list>
+	<list name="keywords">
+		<item> as </item>
+		<item> assert </item>
+		<item> break </item>
+		<item> const </item>
+		<item> copy </item>
+		<item> do </item>
+		<item> drop </item>
+		<item> else </item>
+		<item> enum </item>
+		<item> export </item>
+		<item> extern </item>
+		<item> fail </item>
+		<item> for </item>
+		<item> if </item>
+		<item> impl </item>
+		<item> let </item>
+		<item> log </item>
+		<item> loop </item>
+		<item> match </item>
+		<item> mod </item>
+		<item> move </item>
+		<item> mut </item>
+		<item> priv </item>
+		<item> pub </item>
+		<item> pure </item>
+		<item> ref </item>
+		<item> return </item>
+		<item> static </item>
+		<item> struct </item>
+		<item> trait </item>
+		<item> unsafe </item>
+		<item> use </item>
+		<item> while </item>
+	</list>
+	<list name="types">
+		<item> bool </item>
+		<item> int </item>
+		<item> uint </item>
+		<item> i8 </item>
+		<item> i16 </item>
+		<item> i32 </item>
+		<item> i64 </item>
+		<item> u8 </item>
+		<item> u16 </item>
+		<item> u32 </item>
+		<item> u64 </item>
+		<item> f32 </item>
+		<item> f64 </item>
+		<item> float </item>
+		<item> char </item>
+		<item> str </item>
+		<item> Either </item>
+		<item> Option </item>
+		<item> Result </item>
+	</list>
+	<list name="ctypes">
+		<item> c_float </item>
+		<item> c_double </item>
+		<item> c_void </item>
+		<item> FILE </item>
+		<item> fpos_t </item>
+		<item> DIR </item>
+		<item> dirent </item>
+		<item> c_char </item>
+		<item> c_schar </item>
+		<item> c_uchar </item>
+		<item> c_short </item>
+		<item> c_ushort </item>
+		<item> c_int </item>
+		<item> c_uint </item>
+		<item> c_long </item>
+		<item> c_ulong </item>
+		<item> size_t </item>
+		<item> ptrdiff_t </item>
+		<item> clock_t </item>
+		<item> time_t </item>
+		<item> c_longlong </item>
+		<item> c_ulonglong </item>
+		<item> intptr_t </item>
+		<item> uintptr_t </item>
+		<item> off_t </item>
+		<item> dev_t </item>
+		<item> ino_t </item>
+		<item> pid_t </item>
+		<item> mode_t </item>
+		<item> ssize_t </item>
+	</list>
+	<list name="self">
+		<item> self </item>
+	</list>
+	<list name="constants">
+		<item> true </item>
+		<item> false </item>
+		<item> Some </item>
+		<item> None </item>
+		<item> Left </item>
+		<item> Right </item>
+		<item> Ok </item>
+		<item> Err </item>
+		<item> Success </item>
+		<item> Failure </item>
+		<item> Cons </item>
+		<item> Nil </item>
+	</list>
+	<list name="cconstants">
+		<item> EXIT_FAILURE </item>
+		<item> EXIT_SUCCESS </item>
+		<item> RAND_MAX </item>
+		<item> EOF </item>
+		<item> SEEK_SET </item>
+		<item> SEEK_CUR </item>
+		<item> SEEK_END </item>
+		<item> _IOFBF </item>
+		<item> _IONBF </item>
+		<item> _IOLBF </item>
+		<item> BUFSIZ </item>
+		<item> FOPEN_MAX </item>
+		<item> FILENAME_MAX </item>
+		<item> L_tmpnam </item>
+		<item> TMP_MAX </item>
+		<item> O_RDONLY </item>
+		<item> O_WRONLY </item>
+		<item> O_RDWR </item>
+		<item> O_APPEND </item>
+		<item> O_CREAT </item>
+		<item> O_EXCL </item>
+		<item> O_TRUNC </item>
+		<item> S_IFIFO </item>
+		<item> S_IFCHR </item>
+		<item> S_IFBLK </item>
+		<item> S_IFDIR </item>
+		<item> S_IFREG </item>
+		<item> S_IFMT </item>
+		<item> S_IEXEC </item>
+		<item> S_IWRITE </item>
+		<item> S_IREAD </item>
+		<item> S_IRWXU </item>
+		<item> S_IXUSR </item>
+		<item> S_IWUSR </item>
+		<item> S_IRUSR </item>
+		<item> F_OK </item>
+		<item> R_OK </item>
+		<item> W_OK </item>
+		<item> X_OK </item>
+		<item> STDIN_FILENO </item>
+		<item> STDOUT_FILENO </item>
+		<item> STDERR_FILENO </item>
+	</list>
+	<contexts>
+		<context attribute="Normal Text" lineEndContext="#stay" name="Normal">
+			<DetectSpaces/>
+			<keyword String="fn" attribute="Keyword" context="Function"/>
+			<keyword String="type" attribute="Keyword" context="Type"/>
+			<keyword String="keywords" attribute="Keyword" context="#stay"/>
+			<keyword String="types" attribute="Type" context="#stay"/>
+			<keyword String="ctypes" attribute="CType" context="#stay"/>
+			<keyword String="self" attribute="Self" context="#stay"/>
+			<keyword String="constants" attribute="Constant" context="#stay"/>
+			<keyword String="cconstants" attribute="CConstant" context="#stay"/>
+			<Detect2Chars char="/" char1="/" attribute="Comment" context="Commentar 1"/>
+			<Detect2Chars char="/" char1="*" attribute="Comment" context="Commentar 2" beginRegion="Comment"/>
+			<RegExpr String="0x[0-9a-fA-F_]+(u8|u16|u32|u64|i8|i16|i32|i64|u|i)?" attribute="Number" context="#stay"/>
+			<RegExpr String="0b[0-1_]+(u8|u16|u32|u64|i8|i16|i32|i64|u|i)?" attribute="Number" context="#stay"/>
+			<RegExpr String="[0-9][0-9_]*\.[0-9_]*([eE][+-]?[0-9_]+)?(f32|f64|f)?" attribute="Number" context="#stay"/>
+			<RegExpr String="[0-9][0-9_]*(u8|u16|u32|u64|i8|i16|i32|i64|u|i)?" attribute="Number" context="#stay"/>
+			<RegExpr String="[a-zA-Z_][a-zA-Z0-9_]*::" attribute="Scope"/>
+			<DetectChar char="{" attribute="Symbol" context="#stay" beginRegion="Brace" />
+			<DetectChar char="}" attribute="Symbol" context="#stay" endRegion="Brace" />
+			<DetectChar char="&quot;" attribute="String" context="String"/>
+			<DetectChar char="&apos;" attribute="Character" context="Character"/>
+			<DetectIdentifier/>
+		</context>
+		<context attribute="Definition" lineEndContext="#stay" name="Function">
+			<DetectSpaces/>
+			<DetectChar char="(" attribute="Normal Text" context="#pop"/>
+			<DetectChar char="&lt;" attribute="Normal Text" context="#pop"/>
+		</context>
+		<context attribute="Definition" lineEndContext="#stay" name="Type">
+			<DetectSpaces/>
+			<DetectChar char="=" attribute="Normal Text" context="#pop"/>
+			<DetectChar char="&lt;" attribute="Normal Text" context="#pop"/>
+		</context>
+		<context attribute="String" lineEndContext="#stay" name="String">
+			<LineContinue attribute="String" context="#stay"/>
+			<HlCStringChar attribute="String Char" context="#stay"/>
+			<DetectChar attribute="String" context="#pop" char="&quot;"/>
+		</context>
+		<context attribute="Character" lineEndContext="#pop" name="Character">
+			<HlCStringChar attribute="Character" context="#stay"/>
+			<DetectChar attribute="Character" context="#pop" char="&apos;"/>
+		</context>
+		<context attribute="Comment" lineEndContext="#pop" name="Commentar 1"/>
+		<context attribute="Comment" lineEndContext="#stay" name="Commentar 2">
+			<DetectSpaces/>
+			<Detect2Chars char="*" char1="/" attribute="Comment" context="#pop" endRegion="Comment"/>
+		</context>
+	</contexts>
+    <itemDatas>
+		<itemData name="Normal Text"  defStyleNum="dsNormal"/>
+		<itemData name="Keyword"      defStyleNum="dsKeyword" color="#770088" bold="1"/>
+		<itemData name="Self"         defStyleNum="dsKeyword" color="#FF0000" bold="1"/>
+		<itemData name="Type"         defStyleNum="dsKeyword" color="#4e9a06" bold="1"/>
+		<itemData name="CType"        defStyleNum="dsNormal" color="#4e9a06"/>
+		<itemData name="Constant"     defStyleNum="dsKeyword" color="#116644"/>
+		<itemData name="CConstant"    defStyleNum="dsNormal" color="#116644"/>
+		<itemData name="Definition"   defStyleNum="dsNormal" color="#0000FF"/>
+		<itemData name="Comment"      defStyleNum="dsComment" color="#AA5500"/>
+		<itemData name="Scope"        defStyleNum="dsNormal" color="#0055AA"/>
+		<itemData name="Number"       defStyleNum="dsDecVal" color="#116644"/>
+		<itemData name="String"       defStyleNum="dsString" color="#FF0000"/>
+		<itemData name="String Char"  defStyleNum="dsChar" color="#FF0000"/>
+		<itemData name="Character"    defStyleNum="dsChar" color="#FF0000"/>
+	</itemDatas>
+</highlighting>
+<general>
+	<comments>
+		<comment name="singleLine" start="//" />
+		<comment name="multiLine" start="/*" end="*/" region="Comment"/>
+	</comments>
+	<keywords casesensitive="1" />
+</general>
+</language>
