@@ -7,7 +7,7 @@ package up your Rust code and share it with other people. This tutorial will
77get you started on all of the concepts and commands you need to give the gift
88of Rust code to someone else.
99
10- ## Installing External Packages
10+ # Installing External Packages
1111
1212First, let's try to use an external package somehow. I've made a sample package
1313called ` hello ` to demonstrate how to do so. Here's how ` hello ` is used:
@@ -68,7 +68,7 @@ Hello, world.
6868
6969Simple! That's all it takes.
7070
71- ## Workspaces
71+ # Workspaces
7272
7373Before we can talk about how to make packages of your own, you have to
7474understand the big concept with ` rustpkg ` : workspaces. A 'workspace' is simply
@@ -88,14 +88,14 @@ There are also default file names you'll want to follow as well:
8888* ` main.rs ` : A file that's going to become an executable.
8989* ` lib.rs ` : A file that's going to become a library.
9090
91- ## Building your own Package
91+ # Building your own Package
9292
9393Now that you've got workspaces down, let's build your own copy of ` hello ` . Go
9494to wherever you keep your personal projects, and let's make all of the
9595directories we'll need. I'll refer to this personal project directory as
9696` ~/src ` for the rest of this tutorial.
9797
98- ### Creating our workspace
98+ ## Creating our workspace
9999
100100~~~ {.notrust}
101101$ cd ~/src
@@ -150,15 +150,15 @@ pub fn world() {
150150
151151Put this into ` src/hello/lib.rs ` . Let's talk about each of these attributes:
152152
153- ### Crate attributes for packages
153+ ## Crate attributes for packages
154154
155155` license ` is equally simple: the license we want this code to have. I chose MIT
156156here, but you should pick whatever license makes the most sense for you.
157157
158158` desc ` is a description of the package and what it does. This should just be a
159159sentence or two.
160160
161- ### Building your package
161+ ## Building your package
162162
163163Building your package is simple:
164164
@@ -206,7 +206,7 @@ note: Installed package github.com/YOUR_USERNAME/hello-0.1 to /home/yourusername
206206
207207That's it!
208208
209- ## More resources
209+ # More resources
210210
211211There's a lot more going on with ` rustpkg ` , this is just to get you started.
212212Check out [ the rustpkg manual] ( rustpkg.html ) for the full details on how to
0 commit comments