Skip to content

Commit 5dfd59d

Browse files
committed
meta: Add .gitignore, clarify README, add rustfmt.toml
1 parent 7336542 commit 5dfd59d

File tree

3 files changed

+119
-2
lines changed

3 files changed

+119
-2
lines changed

.gitignore

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
# Generated by Cargo
2+
# will have compiled files and executables
3+
debug/
4+
target/
5+
6+
# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
7+
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
8+
Cargo.lock
9+
10+
# These are backup files generated by rustfmt
11+
**/*.rs.bk
12+
13+
# MSVC Windows builds of rustc generate these, which store debugging information
14+
*.pdb
15+
16+
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
17+
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
18+
19+
# User-specific stuff
20+
.idea/**/workspace.xml
21+
.idea/**/tasks.xml
22+
.idea/**/usage.statistics.xml
23+
.idea/**/dictionaries
24+
.idea/**/shelf
25+
26+
# AWS User-specific
27+
.idea/**/aws.xml
28+
29+
# Generated files
30+
.idea/**/contentModel.xml
31+
32+
# Sensitive or high-churn files
33+
.idea/**/dataSources/
34+
.idea/**/dataSources.ids
35+
.idea/**/dataSources.local.xml
36+
.idea/**/sqlDataSources.xml
37+
.idea/**/dynamic.xml
38+
.idea/**/uiDesigner.xml
39+
.idea/**/dbnavigator.xml
40+
41+
# Gradle
42+
.idea/**/gradle.xml
43+
.idea/**/libraries
44+
45+
# Gradle and Maven with auto-import
46+
# When using Gradle or Maven with auto-import, you should exclude module files,
47+
# since they will be recreated, and may cause churn. Uncomment if using
48+
# auto-import.
49+
# .idea/artifacts
50+
# .idea/compiler.xml
51+
# .idea/jarRepositories.xml
52+
# .idea/modules.xml
53+
# .idea/*.iml
54+
# .idea/modules
55+
# *.iml
56+
# *.ipr
57+
58+
# CMake
59+
cmake-build-*/
60+
61+
# Mongo Explorer plugin
62+
.idea/**/mongoSettings.xml
63+
64+
# File-based project format
65+
*.iws
66+
67+
# IntelliJ
68+
out/
69+
70+
# mpeltonen/sbt-idea plugin
71+
.idea_modules/
72+
73+
# JIRA plugin
74+
atlassian-ide-plugin.xml
75+
76+
# Cursive Clojure plugin
77+
.idea/replstate.xml
78+
79+
# Crashlytics plugin (for Android Studio and IntelliJ)
80+
com_crashlytics_export_strings.xml
81+
crashlytics.properties
82+
crashlytics-build.properties
83+
fabric.properties
84+
85+
# Editor-based Rest Client
86+
.idea/httpRequests
87+
88+
# Android studio 3.1+ serialized cache file
89+
.idea/caches/build_file_checksums.ser

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ Matching the license of the tinydtls C library, this library is made available b
88
the terms of the Eclipse Public License v1.0 and 3-Clause BSD License (which the
99
Eclipse Distribution License v1.0 that is used for tinydtls is based on).
1010

11-
You may choose at your own option which of the two licenses you wish to use. This also
12-
applies to the tinydtls C library, see https://www.eclipse.org/legal/eplfaq.php#DUALLIC
11+
You may choose at your own option which of the two licenses you wish to use for the Rust
12+
crate code and the TinyDTLS C library itself, see https://www.eclipse.org/legal/eplfaq.php#DUALLIC.
1313

1414
Additionally, the tinydtls C library contains third party code that might be included
1515
in compiled binaries that link to tinydtls.

rustfmt.toml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
unstable_features = true
2+
3+
edition = "2018"
4+
5+
# Maximum width of each line
6+
max_width = 120
7+
8+
# Use field initialize shorthand if possible.
9+
use_field_init_shorthand = true
10+
11+
# Put a trailing comma after a block based match arm (non-block arms are not affected)
12+
match_block_trailing_comma = true
13+
14+
# Error if unable to get all lines within max_width
15+
error_on_line_overflow = false
16+
17+
# Merge multiple imports into a single nested import.
18+
imports_granularity = "Crate"
19+
20+
reorder_imports = true
21+
22+
group_imports = "StdExternalCrate"
23+
24+
# Reorder impl items. type and const are put first, then macros and methods.
25+
reorder_impl_items = true
26+
27+
# Determines if + or = are wrapped in spaces in the punctuation of types
28+
type_punctuation_density = "Compressed"

0 commit comments

Comments
 (0)