Skip to content

Commit 58cb410

Browse files
committed
[Rust] Add initial version of package
1 parent ee3a3f7 commit 58cb410

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+1931
-0
lines changed

Rust/Cargo.sublime-build

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"cmd": ["cargo", "build"],
3+
"selector": "source.rust",
4+
"file_regex": "^(.*?):([0-9]+):([0-9]+):\\s[0-9]+:[0-9]+\\s(.*)$",
5+
"syntax": "Packages/Rust/Cargo.sublime-syntax",
6+
7+
"variants": [
8+
{
9+
"cmd": ["cargo", "run"],
10+
"name": "Run"
11+
},
12+
{
13+
"cmd": ["cargo", "test"],
14+
"name": "Test"
15+
},
16+
{
17+
"cmd": ["cargo", "bench"],
18+
"name": "Bench"
19+
},
20+
{
21+
"cmd": ["cargo", "clean"],
22+
"name": "Clean"
23+
}
24+
]
25+
}

Rust/Cargo.sublime-syntax

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
%YAML 1.2
2+
---
3+
# http://www.sublimetext.com/docs/3/syntax.html
4+
name: Cargo Build Results
5+
scope: source.build_results
6+
hidden: true
7+
contexts:
8+
main:
9+
- match: '^(..[^:\n]*):([0-9]+):?([0-9]+)?:? '
10+
scope: entity.name.filename
11+
- match: '\berror: '
12+
scope: message.error
13+
- match: '^\[.+\]$'
14+
scope: comment

Rust/Default.sublime-keymap

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[
2+
// Disable auto-pair for single quote
3+
{ "keys": ["'"], "command": "insert_snippet", "args": {"contents": "'"}, "context":
4+
[{ "key": "selector", "operator": "equal", "operand": "source.rust" }]
5+
}
6+
]

Rust/LICENSE.txt

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
Permission is hereby granted, free of charge, to any person obtaining a copy
2+
of this software and associated documentation files (the "Software"), to deal
3+
in the Software without restriction, including without limitation the rights
4+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
5+
copies of the Software, and to permit persons to whom the Software is
6+
furnished to do so, subject to the following conditions:
7+
8+
The above copyright notice and this permission notice shall be included in
9+
all copies or substantial portions of the Software.
10+
11+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
12+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
13+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
14+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
15+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
16+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
17+
THE SOFTWARE.

Rust/Rust.sublime-build

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"cmd": ["rustc", "$file"],
3+
"selector": "source.rust",
4+
"file_regex": "^(.*?):([0-9]+):([0-9]+):\\s[0-9]+:[0-9]+\\s(.*)$",
5+
"osx":
6+
{
7+
"path": "/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin"
8+
},
9+
10+
"variants": [
11+
{
12+
"selector": "source.rust",
13+
"cmd": ["./$file_base_name"],
14+
"name": "Run",
15+
"windows":
16+
{
17+
"cmd": ["$file_base_name.exe"]
18+
}
19+
}
20+
]
21+
}

0 commit comments

Comments
 (0)