diff --git a/ch2/.lock b/ch2/.lock
new file mode 100755
index 00000000..e69de29b
diff --git a/ch2/COPYRIGHT.txt b/ch2/COPYRIGHT.txt
new file mode 100644
index 00000000..c2629a83
--- /dev/null
+++ b/ch2/COPYRIGHT.txt
@@ -0,0 +1,50 @@
+These documentation pages include resources by third parties. This copyright
+file applies only to those resources. The following third party resources are
+included, and carry their own copyright notices and license terms:
+
+* Fira Sans (FiraSans-Regular.woff2, FiraSans-Medium.woff2,
+ FiraSans-Regular.woff, FiraSans-Medium.woff):
+
+ Copyright (c) 2014, Mozilla Foundation https://mozilla.org/
+ with Reserved Font Name Fira Sans.
+
+ Copyright (c) 2014, Telefonica S.A.
+
+ Licensed under the SIL Open Font License, Version 1.1.
+ See FiraSans-LICENSE.txt.
+
+* rustdoc.css, main.js, and playpen.js:
+
+ Copyright 2015 The Rust Developers.
+ Licensed under the Apache License, Version 2.0 (see LICENSE-APACHE.txt) or
+ the MIT license (LICENSE-MIT.txt) at your option.
+
+* normalize.css:
+
+ Copyright (c) Nicolas Gallagher and Jonathan Neal.
+ Licensed under the MIT license (see LICENSE-MIT.txt).
+
+* Source Code Pro (SourceCodePro-Regular.ttf.woff2,
+ SourceCodePro-Semibold.ttf.woff2, SourceCodePro-It.ttf.woff2,
+ SourceCodePro-Regular.ttf.woff, SourceCodePro-Semibold.ttf.woff,
+ SourceCodePro-It.ttf.woff):
+
+ Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/),
+ with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark
+ of Adobe Systems Incorporated in the United States and/or other countries.
+
+ Licensed under the SIL Open Font License, Version 1.1.
+ See SourceCodePro-LICENSE.txt.
+
+* Source Serif 4 (SourceSerif4-Regular.ttf.woff2, SourceSerif4-Bold.ttf.woff2,
+ SourceSerif4-It.ttf.woff2, SourceSerif4-Regular.ttf.woff,
+ SourceSerif4-Bold.ttf.woff, SourceSerif4-It.ttf.woff):
+
+ Copyright 2014-2021 Adobe (http://www.adobe.com/), with Reserved Font Name
+ 'Source'. All Rights Reserved. Source is a trademark of Adobe in the United
+ States and/or other countries.
+
+ Licensed under the SIL Open Font License, Version 1.1.
+ See SourceSerif4-LICENSE.md.
+
+This copyright file is intended to be distributed with rustdoc output.
diff --git a/ch2/FiraSans-LICENSE.txt b/ch2/FiraSans-LICENSE.txt
new file mode 100644
index 00000000..ff9afab0
--- /dev/null
+++ b/ch2/FiraSans-LICENSE.txt
@@ -0,0 +1,94 @@
+Digitized data copyright (c) 2012-2015, The Mozilla Foundation and Telefonica S.A.
+with Reserved Font Name < Fira >,
+
+This Font Software is licensed under the SIL Open Font License, Version 1.1.
+This license is copied below, and is also available with a FAQ at:
+http://scripts.sil.org/OFL
+
+
+-----------------------------------------------------------
+SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
+-----------------------------------------------------------
+
+PREAMBLE
+The goals of the Open Font License (OFL) are to stimulate worldwide
+development of collaborative font projects, to support the font creation
+efforts of academic and linguistic communities, and to provide a free and
+open framework in which fonts may be shared and improved in partnership
+with others.
+
+The OFL allows the licensed fonts to be used, studied, modified and
+redistributed freely as long as they are not sold by themselves. The
+fonts, including any derivative works, can be bundled, embedded,
+redistributed and/or sold with any software provided that any reserved
+names are not used by derivative works. The fonts and derivatives,
+however, cannot be released under any other type of license. The
+requirement for fonts to remain under this license does not apply
+to any document created using the fonts or their derivatives.
+
+DEFINITIONS
+"Font Software" refers to the set of files released by the Copyright
+Holder(s) under this license and clearly marked as such. This may
+include source files, build scripts and documentation.
+
+"Reserved Font Name" refers to any names specified as such after the
+copyright statement(s).
+
+"Original Version" refers to the collection of Font Software components as
+distributed by the Copyright Holder(s).
+
+"Modified Version" refers to any derivative made by adding to, deleting,
+or substituting -- in part or in whole -- any of the components of the
+Original Version, by changing formats or by porting the Font Software to a
+new environment.
+
+"Author" refers to any designer, engineer, programmer, technical
+writer or other person who contributed to the Font Software.
+
+PERMISSION & CONDITIONS
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of the Font Software, to use, study, copy, merge, embed, modify,
+redistribute, and sell modified and unmodified copies of the Font
+Software, subject to the following conditions:
+
+1) Neither the Font Software nor any of its individual components,
+in Original or Modified Versions, may be sold by itself.
+
+2) Original or Modified Versions of the Font Software may be bundled,
+redistributed and/or sold with any software, provided that each copy
+contains the above copyright notice and this license. These can be
+included either as stand-alone text files, human-readable headers or
+in the appropriate machine-readable metadata fields within text or
+binary files as long as those fields can be easily viewed by the user.
+
+3) No Modified Version of the Font Software may use the Reserved Font
+Name(s) unless explicit written permission is granted by the corresponding
+Copyright Holder. This restriction only applies to the primary font name as
+presented to the users.
+
+4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
+Software shall not be used to promote, endorse or advertise any
+Modified Version, except to acknowledge the contribution(s) of the
+Copyright Holder(s) and the Author(s) or with their explicit written
+permission.
+
+5) The Font Software, modified or unmodified, in part or in whole,
+must be distributed entirely under this license, and must not be
+distributed under any other license. The requirement for fonts to
+remain under this license does not apply to any document created
+using the Font Software.
+
+TERMINATION
+This license becomes null and void if any of the above conditions are
+not met.
+
+DISCLAIMER
+THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
+COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
+DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
+OTHER DEALINGS IN THE FONT SOFTWARE.
diff --git a/ch2/FiraSans-Medium.woff b/ch2/FiraSans-Medium.woff
new file mode 100644
index 00000000..7d742c5f
Binary files /dev/null and b/ch2/FiraSans-Medium.woff differ
diff --git a/ch2/FiraSans-Medium.woff2 b/ch2/FiraSans-Medium.woff2
new file mode 100644
index 00000000..7a1e5fc5
Binary files /dev/null and b/ch2/FiraSans-Medium.woff2 differ
diff --git a/ch2/FiraSans-Regular.woff b/ch2/FiraSans-Regular.woff
new file mode 100644
index 00000000..d8e0363f
Binary files /dev/null and b/ch2/FiraSans-Regular.woff differ
diff --git a/ch2/FiraSans-Regular.woff2 b/ch2/FiraSans-Regular.woff2
new file mode 100644
index 00000000..e766e06c
Binary files /dev/null and b/ch2/FiraSans-Regular.woff2 differ
diff --git a/ch2/LICENSE-APACHE.txt b/ch2/LICENSE-APACHE.txt
new file mode 100644
index 00000000..16fe87b0
--- /dev/null
+++ b/ch2/LICENSE-APACHE.txt
@@ -0,0 +1,201 @@
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+END OF TERMS AND CONDITIONS
+
+APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+Copyright [yyyy] [name of copyright owner]
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
diff --git a/ch2/LICENSE-MIT.txt b/ch2/LICENSE-MIT.txt
new file mode 100644
index 00000000..31aa7938
--- /dev/null
+++ b/ch2/LICENSE-MIT.txt
@@ -0,0 +1,23 @@
+Permission is hereby granted, free of charge, to any
+person obtaining a copy of this software and associated
+documentation files (the "Software"), to deal in the
+Software without restriction, including without
+limitation the rights to use, copy, modify, merge,
+publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software
+is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice
+shall be included in all copies or substantial portions
+of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
+ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
+TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
+PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
+SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
+IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+DEALINGS IN THE SOFTWARE.
diff --git a/ch2/NanumBarunGothic-LICENSE.txt b/ch2/NanumBarunGothic-LICENSE.txt
new file mode 100644
index 00000000..0bf46682
--- /dev/null
+++ b/ch2/NanumBarunGothic-LICENSE.txt
@@ -0,0 +1,99 @@
+Copyright (c) 2010, NAVER Corporation (https://www.navercorp.com/),
+
+with Reserved Font Name Nanum, Naver Nanum, NanumGothic, Naver NanumGothic,
+NanumMyeongjo, Naver NanumMyeongjo, NanumBrush, Naver NanumBrush, NanumPen,
+Naver NanumPen, Naver NanumGothicEco, NanumGothicEco, Naver NanumMyeongjoEco,
+NanumMyeongjoEco, Naver NanumGothicLight, NanumGothicLight, NanumBarunGothic,
+Naver NanumBarunGothic, NanumSquareRound, NanumBarunPen, MaruBuri
+
+This Font Software is licensed under the SIL Open Font License, Version 1.1.
+This license is copied below, and is also available with a FAQ at:
+http://scripts.sil.org/OFL
+
+
+-----------------------------------------------------------
+SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
+-----------------------------------------------------------
+
+PREAMBLE
+The goals of the Open Font License (OFL) are to stimulate worldwide
+development of collaborative font projects, to support the font creation
+efforts of academic and linguistic communities, and to provide a free and
+open framework in which fonts may be shared and improved in partnership
+with others.
+
+The OFL allows the licensed fonts to be used, studied, modified and
+redistributed freely as long as they are not sold by themselves. The
+fonts, including any derivative works, can be bundled, embedded,
+redistributed and/or sold with any software provided that any reserved
+names are not used by derivative works. The fonts and derivatives,
+however, cannot be released under any other type of license. The
+requirement for fonts to remain under this license does not apply
+to any document created using the fonts or their derivatives.
+
+DEFINITIONS
+"Font Software" refers to the set of files released by the Copyright
+Holder(s) under this license and clearly marked as such. This may
+include source files, build scripts and documentation.
+
+"Reserved Font Name" refers to any names specified as such after the
+copyright statement(s).
+
+"Original Version" refers to the collection of Font Software components as
+distributed by the Copyright Holder(s).
+
+"Modified Version" refers to any derivative made by adding to, deleting,
+or substituting -- in part or in whole -- any of the components of the
+Original Version, by changing formats or by porting the Font Software to a
+new environment.
+
+"Author" refers to any designer, engineer, programmer, technical
+writer or other person who contributed to the Font Software.
+
+PERMISSION & CONDITIONS
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of the Font Software, to use, study, copy, merge, embed, modify,
+redistribute, and sell modified and unmodified copies of the Font
+Software, subject to the following conditions:
+
+1) Neither the Font Software nor any of its individual components,
+in Original or Modified Versions, may be sold by itself.
+
+2) Original or Modified Versions of the Font Software may be bundled,
+redistributed and/or sold with any software, provided that each copy
+contains the above copyright notice and this license. These can be
+included either as stand-alone text files, human-readable headers or
+in the appropriate machine-readable metadata fields within text or
+binary files as long as those fields can be easily viewed by the user.
+
+3) No Modified Version of the Font Software may use the Reserved Font
+Name(s) unless explicit written permission is granted by the corresponding
+Copyright Holder. This restriction only applies to the primary font name as
+presented to the users.
+
+4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
+Software shall not be used to promote, endorse or advertise any
+Modified Version, except to acknowledge the contribution(s) of the
+Copyright Holder(s) and the Author(s) or with their explicit written
+permission.
+
+5) The Font Software, modified or unmodified, in part or in whole,
+must be distributed entirely under this license, and must not be
+distributed under any other license. The requirement for fonts to
+remain under this license does not apply to any document created
+using the Font Software.
+
+TERMINATION
+This license becomes null and void if any of the above conditions are
+not met.
+
+DISCLAIMER
+THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
+COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
+DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
+OTHER DEALINGS IN THE FONT SOFTWARE.
diff --git a/ch2/NanumBarunGothic.ttf.woff b/ch2/NanumBarunGothic.ttf.woff
new file mode 100644
index 00000000..fb063e8f
Binary files /dev/null and b/ch2/NanumBarunGothic.ttf.woff differ
diff --git a/ch2/NanumBarunGothic.ttf.woff2 b/ch2/NanumBarunGothic.ttf.woff2
new file mode 100644
index 00000000..1866ad4b
Binary files /dev/null and b/ch2/NanumBarunGothic.ttf.woff2 differ
diff --git a/ch2/SourceCodePro-It.ttf.woff b/ch2/SourceCodePro-It.ttf.woff
new file mode 100644
index 00000000..8d68f2fe
Binary files /dev/null and b/ch2/SourceCodePro-It.ttf.woff differ
diff --git a/ch2/SourceCodePro-It.ttf.woff2 b/ch2/SourceCodePro-It.ttf.woff2
new file mode 100644
index 00000000..462c34ef
Binary files /dev/null and b/ch2/SourceCodePro-It.ttf.woff2 differ
diff --git a/ch2/SourceCodePro-LICENSE.txt b/ch2/SourceCodePro-LICENSE.txt
new file mode 100644
index 00000000..07542572
--- /dev/null
+++ b/ch2/SourceCodePro-LICENSE.txt
@@ -0,0 +1,93 @@
+Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe Systems Incorporated in the United States and/or other countries.
+
+This Font Software is licensed under the SIL Open Font License, Version 1.1.
+
+This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL
+
+
+-----------------------------------------------------------
+SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
+-----------------------------------------------------------
+
+PREAMBLE
+The goals of the Open Font License (OFL) are to stimulate worldwide
+development of collaborative font projects, to support the font creation
+efforts of academic and linguistic communities, and to provide a free and
+open framework in which fonts may be shared and improved in partnership
+with others.
+
+The OFL allows the licensed fonts to be used, studied, modified and
+redistributed freely as long as they are not sold by themselves. The
+fonts, including any derivative works, can be bundled, embedded,
+redistributed and/or sold with any software provided that any reserved
+names are not used by derivative works. The fonts and derivatives,
+however, cannot be released under any other type of license. The
+requirement for fonts to remain under this license does not apply
+to any document created using the fonts or their derivatives.
+
+DEFINITIONS
+"Font Software" refers to the set of files released by the Copyright
+Holder(s) under this license and clearly marked as such. This may
+include source files, build scripts and documentation.
+
+"Reserved Font Name" refers to any names specified as such after the
+copyright statement(s).
+
+"Original Version" refers to the collection of Font Software components as
+distributed by the Copyright Holder(s).
+
+"Modified Version" refers to any derivative made by adding to, deleting,
+or substituting -- in part or in whole -- any of the components of the
+Original Version, by changing formats or by porting the Font Software to a
+new environment.
+
+"Author" refers to any designer, engineer, programmer, technical
+writer or other person who contributed to the Font Software.
+
+PERMISSION & CONDITIONS
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of the Font Software, to use, study, copy, merge, embed, modify,
+redistribute, and sell modified and unmodified copies of the Font
+Software, subject to the following conditions:
+
+1) Neither the Font Software nor any of its individual components,
+in Original or Modified Versions, may be sold by itself.
+
+2) Original or Modified Versions of the Font Software may be bundled,
+redistributed and/or sold with any software, provided that each copy
+contains the above copyright notice and this license. These can be
+included either as stand-alone text files, human-readable headers or
+in the appropriate machine-readable metadata fields within text or
+binary files as long as those fields can be easily viewed by the user.
+
+3) No Modified Version of the Font Software may use the Reserved Font
+Name(s) unless explicit written permission is granted by the corresponding
+Copyright Holder. This restriction only applies to the primary font name as
+presented to the users.
+
+4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
+Software shall not be used to promote, endorse or advertise any
+Modified Version, except to acknowledge the contribution(s) of the
+Copyright Holder(s) and the Author(s) or with their explicit written
+permission.
+
+5) The Font Software, modified or unmodified, in part or in whole,
+must be distributed entirely under this license, and must not be
+distributed under any other license. The requirement for fonts to
+remain under this license does not apply to any document created
+using the Font Software.
+
+TERMINATION
+This license becomes null and void if any of the above conditions are
+not met.
+
+DISCLAIMER
+THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
+COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
+DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
+OTHER DEALINGS IN THE FONT SOFTWARE.
diff --git a/ch2/SourceCodePro-Regular.ttf.woff b/ch2/SourceCodePro-Regular.ttf.woff
new file mode 100644
index 00000000..7be076e1
Binary files /dev/null and b/ch2/SourceCodePro-Regular.ttf.woff differ
diff --git a/ch2/SourceCodePro-Regular.ttf.woff2 b/ch2/SourceCodePro-Regular.ttf.woff2
new file mode 100644
index 00000000..10b558e0
Binary files /dev/null and b/ch2/SourceCodePro-Regular.ttf.woff2 differ
diff --git a/ch2/SourceCodePro-Semibold.ttf.woff b/ch2/SourceCodePro-Semibold.ttf.woff
new file mode 100644
index 00000000..61bc67b8
Binary files /dev/null and b/ch2/SourceCodePro-Semibold.ttf.woff differ
diff --git a/ch2/SourceCodePro-Semibold.ttf.woff2 b/ch2/SourceCodePro-Semibold.ttf.woff2
new file mode 100644
index 00000000..5ec64eef
Binary files /dev/null and b/ch2/SourceCodePro-Semibold.ttf.woff2 differ
diff --git a/ch2/SourceSerif4-Bold.ttf.woff b/ch2/SourceSerif4-Bold.ttf.woff
new file mode 100644
index 00000000..8ad41888
Binary files /dev/null and b/ch2/SourceSerif4-Bold.ttf.woff differ
diff --git a/ch2/SourceSerif4-Bold.ttf.woff2 b/ch2/SourceSerif4-Bold.ttf.woff2
new file mode 100644
index 00000000..db57d214
Binary files /dev/null and b/ch2/SourceSerif4-Bold.ttf.woff2 differ
diff --git a/ch2/SourceSerif4-It.ttf.woff b/ch2/SourceSerif4-It.ttf.woff
new file mode 100644
index 00000000..2a34b5c4
Binary files /dev/null and b/ch2/SourceSerif4-It.ttf.woff differ
diff --git a/ch2/SourceSerif4-It.ttf.woff2 b/ch2/SourceSerif4-It.ttf.woff2
new file mode 100644
index 00000000..1cbc021a
Binary files /dev/null and b/ch2/SourceSerif4-It.ttf.woff2 differ
diff --git a/ch2/SourceSerif4-LICENSE.md b/ch2/SourceSerif4-LICENSE.md
new file mode 100644
index 00000000..68ea1892
--- /dev/null
+++ b/ch2/SourceSerif4-LICENSE.md
@@ -0,0 +1,93 @@
+Copyright 2014-2021 Adobe (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe in the United States and/or other countries.
+
+This Font Software is licensed under the SIL Open Font License, Version 1.1.
+
+This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL
+
+
+-----------------------------------------------------------
+SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
+-----------------------------------------------------------
+
+PREAMBLE
+The goals of the Open Font License (OFL) are to stimulate worldwide
+development of collaborative font projects, to support the font creation
+efforts of academic and linguistic communities, and to provide a free and
+open framework in which fonts may be shared and improved in partnership
+with others.
+
+The OFL allows the licensed fonts to be used, studied, modified and
+redistributed freely as long as they are not sold by themselves. The
+fonts, including any derivative works, can be bundled, embedded,
+redistributed and/or sold with any software provided that any reserved
+names are not used by derivative works. The fonts and derivatives,
+however, cannot be released under any other type of license. The
+requirement for fonts to remain under this license does not apply
+to any document created using the fonts or their derivatives.
+
+DEFINITIONS
+"Font Software" refers to the set of files released by the Copyright
+Holder(s) under this license and clearly marked as such. This may
+include source files, build scripts and documentation.
+
+"Reserved Font Name" refers to any names specified as such after the
+copyright statement(s).
+
+"Original Version" refers to the collection of Font Software components as
+distributed by the Copyright Holder(s).
+
+"Modified Version" refers to any derivative made by adding to, deleting,
+or substituting -- in part or in whole -- any of the components of the
+Original Version, by changing formats or by porting the Font Software to a
+new environment.
+
+"Author" refers to any designer, engineer, programmer, technical
+writer or other person who contributed to the Font Software.
+
+PERMISSION & CONDITIONS
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of the Font Software, to use, study, copy, merge, embed, modify,
+redistribute, and sell modified and unmodified copies of the Font
+Software, subject to the following conditions:
+
+1) Neither the Font Software nor any of its individual components,
+in Original or Modified Versions, may be sold by itself.
+
+2) Original or Modified Versions of the Font Software may be bundled,
+redistributed and/or sold with any software, provided that each copy
+contains the above copyright notice and this license. These can be
+included either as stand-alone text files, human-readable headers or
+in the appropriate machine-readable metadata fields within text or
+binary files as long as those fields can be easily viewed by the user.
+
+3) No Modified Version of the Font Software may use the Reserved Font
+Name(s) unless explicit written permission is granted by the corresponding
+Copyright Holder. This restriction only applies to the primary font name as
+presented to the users.
+
+4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
+Software shall not be used to promote, endorse or advertise any
+Modified Version, except to acknowledge the contribution(s) of the
+Copyright Holder(s) and the Author(s) or with their explicit written
+permission.
+
+5) The Font Software, modified or unmodified, in part or in whole,
+must be distributed entirely under this license, and must not be
+distributed under any other license. The requirement for fonts to
+remain under this license does not apply to any document created
+using the Font Software.
+
+TERMINATION
+This license becomes null and void if any of the above conditions are
+not met.
+
+DISCLAIMER
+THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
+COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
+DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
+OTHER DEALINGS IN THE FONT SOFTWARE.
diff --git a/ch2/SourceSerif4-Regular.ttf.woff b/ch2/SourceSerif4-Regular.ttf.woff
new file mode 100644
index 00000000..45a5521a
Binary files /dev/null and b/ch2/SourceSerif4-Regular.ttf.woff differ
diff --git a/ch2/SourceSerif4-Regular.ttf.woff2 b/ch2/SourceSerif4-Regular.ttf.woff2
new file mode 100644
index 00000000..2db73fe2
Binary files /dev/null and b/ch2/SourceSerif4-Regular.ttf.woff2 differ
diff --git a/ch2/ayu.css b/ch2/ayu.css
new file mode 100644
index 00000000..dea87bf1
--- /dev/null
+++ b/ch2/ayu.css
@@ -0,0 +1 @@
+ body{background-color:#0f1419;color:#c5c5c5;}h1,h2,h3,h4{color:white;}h1.fqn{border-bottom-color:#5c6773;}h1.fqn a{color:#fff;}h2,h3,h4{border-bottom-color:#5c6773;}h4{border:none;}.in-band{background-color:#0f1419;}.invisible{background:rgba(0,0,0,0);}.docblock code{color:#ffb454;}.code-header{color:#e6e1cf;}.docblock pre>code,pre>code{color:#e6e1cf;}span code{color:#e6e1cf;}.docblock a>code{color:#39AFD7 !important;}.docblock code,.docblock-short code{background-color:#191f26;}pre,.rustdoc.source .example-wrap{color:#e6e1cf;background-color:#191f26;}.sidebar{background-color:#14191f;}.rust-logo{filter:drop-shadow(1px 0 0px #fff) drop-shadow(0 1px 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 -1px 0 #fff);}*{scrollbar-color:#5c6773 #24292f;}.sidebar{scrollbar-color:#5c6773 #24292f;}::-webkit-scrollbar-track{background-color:transparent;}::-webkit-scrollbar-thumb{background-color:#5c6773;}.sidebar::-webkit-scrollbar-track{background-color:transparent;}.sidebar::-webkit-scrollbar-thumb{background-color:#5c6773;}.sidebar .current{background-color:transparent;color:#ffb44c;}.source .sidebar{background-color:#14191f;}.sidebar .location{border-color:#000;background-color:#0f1419;color:#fff;}.sidebar-elems .location{color:#ff7733;}.sidebar-elems .location a{color:#fff;}.sidebar .version{border-bottom-color:#424c57;}.sidebar-title{border-top-color:#5c6773;border-bottom-color:#5c6773;}.block a:hover{background:transparent;color:#ffb44c;}.line-numbers span{color:#5c6773;}.line-numbers .line-highlighted{color:#708090;background-color:rgba(255,236,164,0.06);padding-right:4px;border-right:1px solid #ffb44c;}.docblock h1,.docblock h2,.docblock h3,.docblock h4,.docblock h5,.docblock h6{border-bottom-color:#5c6773;}.docblock table td,.docblock table th{border-color:#5c6773;}.content .method .where,.content .fn .where,.content .where.fmt-newline{color:#c5c5c5;}.search-results a:hover{background-color:#777;}.search-results a:focus{color:#000 !important;background-color:#c6afb3;}.search-results a{color:#0096cf;}.search-results a div.desc{color:#c5c5c5;}.content .item-info::before{color:#ccc;}.content span.foreigntype,.content a.foreigntype{color:#ffa0a5;}.content span.union,.content a.union{color:#ffa0a5;}.content span.constant,.content a.constant,.content span.static,.content a.static{color:#39AFD7;}.content span.primitive,.content a.primitive{color:#ffa0a5;}.content span.traitalias,.content a.traitalias{color:#39AFD7;}.content span.keyword,.content a.keyword{color:#39AFD7;}.content span.externcrate,.content span.mod,.content a.mod{color:#39AFD7;}.content span.struct,.content a.struct{color:#ffa0a5;}.content span.enum,.content a.enum{color:#ffa0a5;}.content span.trait,.content a.trait{color:#39AFD7;}.content span.type,.content a.type{color:#39AFD7;}.content span.type,.content a.type,.block a.current.type{color:#39AFD7;}.content span.associatedtype,.content a.associatedtype,.block a.current.associatedtype{color:#39AFD7;}.content span.fn,.content a.fn,.content span.method,.content a.method,.content span.tymethod,.content a.tymethod,.content .fnname{color:#fdd687;}.content span.attr,.content a.attr,.content span.derive,.content a.derive,.content span.macro,.content a.macro{color:#a37acc;}pre.rust .comment{color:#788797;}pre.rust .doccomment{color:#a1ac88;}nav:not(.sidebar){border-bottom-color:#424c57;}nav.main .current{border-top-color:#5c6773;border-bottom-color:#5c6773;}nav.main .separator{border:1px solid #5c6773;}a{color:#39AFD7;}a#toggle-all-docs,a.anchor,.small-section-header a,#source-sidebar a,pre.rust a,.sidebar a,.in-band a{color:#c5c5c5;}.search-results a{color:#0096cf;}body.source .example-wrap pre.rust a{background:#333;}details.rustdoc-toggle>summary.hideme>span,details.rustdoc-toggle>summary::before,details.undocumented>summary::before{color:#999;}details.rustdoc-toggle>summary::before,details.undocumented>summary::before{filter:invert(100%);}#crate-search{color:#c5c5c5;background-color:#141920;box-shadow:0 0 0 1px #424c57,0 0 0 2px transparent;border-color:#424c57;}.search-input{color:#ffffff;background-color:#141920;box-shadow:0 0 0 1px #424c57,0 0 0 2px transparent;transition:box-shadow 150ms ease-in-out;}#crate-search+.search-input:focus{box-shadow:0 0 0 1px #148099,0 0 0 2px transparent;}.module-item .stab,.import-item .stab{color:#000;}.stab.unstable,.stab.deprecated,.stab.portability{color:#c5c5c5;background:#314559 !important;border-style:none !important;border-radius:4px;padding:3px 6px 3px 6px;}.stab.portability>code{color:#e6e1cf;background:none;}#help>div{background:#14191f;box-shadow:0px 6px 20px 0px black;border:none;border-radius:4px;}#help span.bottom,#help span.top{border-color:#5c6773;}.rightside,.out-of-band{color:grey;}.result-name .primitive>i,.result-name .keyword>i{color:#788797;}.line-numbers :target{background-color:transparent;}pre.rust .number,pre.rust .string{color:#b8cc52;}pre.rust .kw,pre.rust .kw-2,pre.rust .prelude-ty,pre.rust .bool-val,pre.rust .prelude-val,pre.rust .op,pre.rust .lifetime{color:#ff7733;}pre.rust .macro,pre.rust .macro-nonterminal{color:#a37acc;}pre.rust .question-mark{color:#ff9011;}pre.rust .self{color:#36a3d9;font-style:italic;}pre.rust .attribute{color:#e6e1cf;}pre.rust .attribute .ident,pre.rust .attribute .op{color:#e6e1cf;}.example-wrap>pre.line-number{color:#5c67736e;border:none;}a.test-arrow{font-size:100%;color:#788797;border-radius:4px;background-color:rgba(57,175,215,0.09);}a.test-arrow:hover{background-color:rgba(57,175,215,0.368);color:#c5c5c5;}.toggle-label,.code-attribute{color:#999;}:target{background:rgba(255,236,164,0.06);border-right:3px solid rgba(255,180,76,0.85);}pre.compile_fail{border-left:2px solid rgba(255,0,0,.4);}pre.compile_fail:hover,.information:hover+pre.compile_fail{border-left:2px solid #f00;}pre.should_panic{border-left:2px solid rgba(255,0,0,.4);}pre.should_panic:hover,.information:hover+pre.should_panic{border-left:2px solid #f00;}pre.ignore{border-left:2px solid rgba(255,142,0,.6);}pre.ignore:hover,.information:hover+pre.ignore{border-left:2px solid #ff9200;}.tooltip.compile_fail{color:rgba(255,0,0,.5);}.information>.compile_fail:hover{color:#f00;}.tooltip.should_panic{color:rgba(255,0,0,.5);}.information>.should_panic:hover{color:#f00;}.tooltip.ignore{color:rgba(255,142,0,.6);}.information>.ignore:hover{color:#ff9200;}.search-failed a{color:#39AFD7;}.tooltip::after{background-color:#314559;color:#c5c5c5;border:1px solid #5c6773;}.tooltip::before{border-color:transparent #314559 transparent transparent;}.notable-traits-tooltiptext{background-color:#314559;border-color:#5c6773;}.notable-traits-tooltiptext .notable{border-bottom-color:#5c6773;}#titles>button.selected{background-color:#141920 !important;border-bottom:1px solid #ffb44c !important;border-top:none;}#titles>button:not(.selected){background-color:transparent !important;border:none;}#titles>button:hover{border-bottom:1px solid rgba(242,151,24,0.3);}#titles>button>div.count{color:#888;}.search-input:focus{}.content span.attr,.content a.attr,.block a.current.attr,.content span.derive,.content a.derive,.block a.current.derive,.content span.macro,.content a.macro,.block a.current.macro{}.content span.struct,.content a.struct,.block a.current.struct{}#titles>button:hover,#titles>button.selected{}.content span.typedef,.content a.typedef,.block a.current.typedef{}.content span.union,.content a.union,.block a.current.union{}pre.rust .lifetime{}.stab.unstable{}h2,h3:not(.impl):not(.method):not(.type):not(.tymethod),h4:not(.method):not(.type):not(.tymethod){}.content span.enum,.content a.enum,.block a.current.enum{}.content span.constant,.content a.constant,.block a.current.constant,.content span.static,.content a.static,.block a.current.static{}.content span.keyword,.content a.keyword,.block a.current.keyword{}pre.rust .comment{}.content span.traitalias,.content a.traitalias,.block a.current.traitalias{}.content span.fn,.content a.fn,.block a.current.fn,.content span.method,.content a.method,.block a.current.method,.content span.tymethod,.content a.tymethod,.block a.current.tymethod,.content .fnname{}pre.rust .kw{}pre.rust .self,pre.rust .bool-val,pre.rust .prelude-val,pre.rust .attribute,pre.rust .attribute .ident{}.content span.foreigntype,.content a.foreigntype,.block a.current.foreigntype{}pre.rust .doccomment{}.stab.deprecated{}.content a.attr,.content a.derive,.content a.macro{}.stab.portability{}.content span.primitive,.content a.primitive,.block a.current.primitive{}.content span.externcrate,.content span.mod,.content a.mod,.block a.current.mod{}pre.rust .kw-2,pre.rust .prelude-ty{}.content span.trait,.content a.trait,.block a.current.trait{}.search-results a:focus span{}a.result-trait:focus{}a.result-traitalias:focus{}a.result-mod:focus,a.result-externcrate:focus{}a.result-mod:focus{}a.result-externcrate:focus{}a.result-enum:focus{}a.result-struct:focus{}a.result-union:focus{}a.result-fn:focus,a.result-method:focus,a.result-tymethod:focus{}a.result-type:focus{}a.result-associatedtype:focus{}a.result-foreigntype:focus{}a.result-attr:focus,a.result-derive:focus,a.result-macro:focus{}a.result-constant:focus,a.result-static:focus{}a.result-primitive:focus{}a.result-keyword:focus{}@media (max-width:700px){.sidebar-menu{background-color:#14191f;border-bottom-color:#5c6773;border-right-color:#5c6773;}.sidebar-elems{background-color:#14191f;border-right-color:#5c6773;}#sidebar-filler{background-color:#14191f;border-bottom-color:#5c6773;}}kbd{color:#c5c5c5;background-color:#314559;border-color:#5c6773;border-bottom-color:#5c6773;box-shadow-color:#c6cbd1;}#theme-picker,#settings-menu,#help-button{border-color:#5c6773;background-color:#0f1419;color:#fff;}#theme-picker>img,#settings-menu>img{filter:invert(100);}#copy-path{color:#fff;}#copy-path>img{filter:invert(70%);}#copy-path:hover>img{filter:invert(100%);}#theme-picker:hover,#theme-picker:focus,#settings-menu:hover,#settings-menu:focus,#help-button:hover,#help-button:focus{border-color:#e0e0e0;}#theme-choices{border-color:#5c6773;background-color:#0f1419;}#theme-choices>button:not(:first-child){border-top-color:#5c6773;}#theme-choices>button:hover,#theme-choices>button:focus{background-color:rgba(110,110,110,0.33);}@media (max-width:700px){#theme-picker{background:#0f1419;}}#all-types{background-color:#14191f;}#all-types:hover{background-color:rgba(70,70,70,0.33);}.search-results .result-name span.alias{color:#c5c5c5;}.search-results .result-name span.grey{color:#999;}#sidebar-toggle{background-color:#14191f;}#sidebar-toggle:hover{background-color:rgba(70,70,70,0.33);}#source-sidebar{background-color:#14191f;}#source-sidebar>.title{color:#fff;border-bottom-color:#5c6773;}div.files>a:hover,div.name:hover{background-color:#14191f;color:#ffb44c;}div.files>.selected{background-color:#14191f;color:#ffb44c;}.setting-line>.title{border-bottom-color:#5c6773;}input:checked+.slider{background-color:#ffb454 !important;}.scraped-example .example-wrap .rust span.highlight{background:rgb(91,59,1);}.scraped-example .example-wrap .rust span.highlight.focus{background:rgb(124,75,15);}.scraped-example:not(.expanded) .code-wrapper:before{background:linear-gradient(to bottom,rgba(15,20,25,1),rgba(15,20,25,0));}.scraped-example:not(.expanded) .code-wrapper:after{background:linear-gradient(to top,rgba(15,20,25,1),rgba(15,20,25,0));}.toggle-line-inner{background:#616161;}.toggle-line:hover .toggle-line-inner{background:##898989;}
\ No newline at end of file
diff --git a/ch2/brush.svg b/ch2/brush.svg
new file mode 100644
index 00000000..ea266e85
--- /dev/null
+++ b/ch2/brush.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/ch2/clipboard.svg b/ch2/clipboard.svg
new file mode 100644
index 00000000..8adbd996
--- /dev/null
+++ b/ch2/clipboard.svg
@@ -0,0 +1 @@
+
diff --git a/ch2/crates.js b/ch2/crates.js
new file mode 100644
index 00000000..58e198fb
--- /dev/null
+++ b/ch2/crates.js
@@ -0,0 +1 @@
+window.ALL_CRATES = ["os"];
\ No newline at end of file
diff --git a/ch2/dark.css b/ch2/dark.css
new file mode 100644
index 00000000..5b8e0f75
--- /dev/null
+++ b/ch2/dark.css
@@ -0,0 +1 @@
+body{background-color:#353535;color:#ddd;}h1,h2,h3,h4{color:#ddd;}h1.fqn{border-bottom-color:#d2d2d2;}h2,h3,h4{border-bottom-color:#d2d2d2;}.in-band{background-color:#353535;}.invisible{background:rgba(0,0,0,0);}.docblock code,.docblock-short code{background-color:#2A2A2A;}pre,.rustdoc.source .example-wrap{background-color:#2A2A2A;}.sidebar{background-color:#505050;}.rust-logo{filter:drop-shadow(1px 0 0px #fff) drop-shadow(0 1px 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 -1px 0 #fff)}*{scrollbar-color:rgb(64,65,67) #717171;}.sidebar{scrollbar-color:rgba(32,34,37,.6) #5a5a5a;}::-webkit-scrollbar-track{background-color:#717171;}::-webkit-scrollbar-thumb{background-color:rgba(32,34,37,.6);}.sidebar::-webkit-scrollbar-track{background-color:#717171;}.sidebar::-webkit-scrollbar-thumb{background-color:rgba(32,34,37,.6);}.sidebar .current{background-color:#333;}.source .sidebar{background-color:#565656;}.sidebar .location{border-color:#fff;background:#575757;color:#DDD;}.sidebar .version{border-bottom-color:#DDD;}.sidebar-title{border-top-color:#777;border-bottom-color:#777;}.block a:hover{background:#444;}.line-numbers span{color:#3B91E2;}.line-numbers .line-highlighted{background-color:#0a042f !important;}.docblock h1,.docblock h2,.docblock h3,.docblock h4,.docblock h5,.docblock h6{border-bottom-color:#DDD;}.docblock table td,.docblock table th{border-color:#ddd;}.content .method .where,.content .fn .where,.content .where.fmt-newline{color:#ddd;}.search-results a:hover{background-color:#777;}.search-results a:focus{color:#eee !important;background-color:#616161;}.search-results a:focus span{color:#eee !important;}a.result-trait:focus{background-color:#013191;}a.result-traitalias:focus{background-color:#013191;}a.result-mod:focus,a.result-externcrate:focus{background-color:#884719;}a.result-enum:focus{background-color:#194e9f;}a.result-struct:focus{background-color:#194e9f;}a.result-union:focus{background-color:#194e9f;}a.result-fn:focus,a.result-method:focus,a.result-tymethod:focus{background-color:#4950ed;}a.result-type:focus{background-color:#194e9f;}a.result-associatedtype:focus{background-color:#884719;}a.result-foreigntype:focus{background-color:#194e9f;}a.result-attr:focus,a.result-derive:focus,a.result-macro:focus{background-color:#217d1c;}a.result-constant:focus,a.result-static:focus{background-color:#884719;}a.result-primitive:focus{background-color:#194e9f;}a.result-keyword:focus{background-color:#884719;}.content .item-info::before{color:#ccc;}.content span.enum,.content a.enum,.block a.current.enum{color:#2dbfb8;}.content span.struct,.content a.struct,.block a.current.struct{color:#2dbfb8;}.content span.type,.content a.type,.block a.current.type{color:#2dbfb8;}.content span.associatedtype,.content a.associatedtype,.block a.current.associatedtype{color:#D2991D;}.content span.foreigntype,.content a.foreigntype,.block a.current.foreigntype{color:#2dbfb8;}.content span.attr,.content a.attr,.block a.current.attr,.content span.derive,.content a.derive,.block a.current.derive,.content span.macro,.content a.macro,.block a.current.macro{color:#09bd00;}.content span.union,.content a.union,.block a.current.union{color:#2dbfb8;}.content span.constant,.content a.constant,.block a.current.constant,.content span.static,.content a.static,.block a.current.static{color:#D2991D;}.content span.primitive,.content a.primitive,.block a.current.primitive{color:#2dbfb8;}.content span.externcrate,.content span.mod,.content a.mod,.block a.current.mod{color:#D2991D;}.content span.trait,.content a.trait,.block a.current.trait{color:#b78cf2;}.content span.traitalias,.content a.traitalias,.block a.current.traitalias{color:#b78cf2;}.content span.fn,.content a.fn,.block a.current.fn,.content span.method,.content a.method,.block a.current.method,.content span.tymethod,.content a.tymethod,.block a.current.tymethod,.content .fnname{color:#2BAB63;}.content span.keyword,.content a.keyword,.block a.current.keyword{color:#D2991D;}pre.rust .comment{color:#8d8d8b;}pre.rust .doccomment{color:#8ca375;}nav:not(.sidebar){border-bottom-color:#4e4e4e;}nav.main .current{border-top-color:#eee;border-bottom-color:#eee;}nav.main .separator{border-color:#eee;}a{color:#D2991D;}a#toggle-all-docs,a.anchor,.small-section-header a,#source-sidebar a,pre.rust a,.sidebar a,.in-band a{color:#ddd;}.search-results a{color:#ddd;}a.test-arrow{color:#dedede;}body.source .example-wrap pre.rust a{background:#333;}details.rustdoc-toggle>summary.hideme>span,details.rustdoc-toggle>summary::before,details.undocumented>summary::before{color:#999;}details.rustdoc-toggle>summary::before,details.undocumented>summary::before{filter:invert(100%);}#crate-search{color:#111;background-color:#f0f0f0;border-color:#000;box-shadow:0 0 0 1px #000,0 0 0 2px transparent;}.search-input{color:#111;background-color:#f0f0f0;box-shadow:0 0 0 1px #000,0 0 0 2px transparent;}.search-input:focus{border-color:#008dfd;}#crate-search+.search-input:focus{box-shadow:0 0 8px 4px #078dd8;}.module-item .stab,.import-item .stab{color:#ddd;}.stab.unstable{background:#FFF5D6;border-color:#FFC600;color:#2f2f2f;}.stab.deprecated{background:#ffc4c4;border-color:#db7b7b;color:#2f2f2f;}.stab.portability{background:#F3DFFF;border-color:#b07bdb;color:#2f2f2f;}.stab.portability>code{background:none;}#help>div{background:#4d4d4d;border-color:#bfbfbf;}#help span.bottom,#help span.top{border-color:#bfbfbf;}#help dt{border-color:#bfbfbf;background:rgba(0,0,0,0);}.rightside,.out-of-band{color:grey;}.result-name .primitive>i,.result-name .keyword>i{color:#ddd;}.line-numbers :target{background-color:transparent;}pre.rust .kw{color:#ab8ac1;}pre.rust .kw-2,pre.rust .prelude-ty{color:#769acb;}pre.rust .number,pre.rust .string{color:#83a300;}pre.rust .self,pre.rust .bool-val,pre.rust .prelude-val,pre.rust .attribute,pre.rust .attribute .ident{color:#ee6868;}pre.rust .macro,pre.rust .macro-nonterminal{color:#3E999F;}pre.rust .lifetime{color:#d97f26;}pre.rust .question-mark{color:#ff9011;}.example-wrap>pre.line-number{border-color:#4a4949;}a.test-arrow{background-color:rgba(78,139,202,0.2);}a.test-arrow:hover{background-color:#4e8bca;}.toggle-label,.code-attribute{color:#999;}:target{background-color:#494a3d;border-right:3px solid #bb7410;}pre.compile_fail{border-left:2px solid rgba(255,0,0,.8);}pre.compile_fail:hover,.information:hover+pre.compile_fail{border-left:2px solid #f00;}pre.should_panic{border-left:2px solid rgba(255,0,0,.8);}pre.should_panic:hover,.information:hover+pre.should_panic{border-left:2px solid #f00;}pre.ignore{border-left:2px solid rgba(255,142,0,.6);}pre.ignore:hover,.information:hover+pre.ignore{border-left:2px solid #ff9200;}.tooltip.compile_fail{color:rgba(255,0,0,.8);}.information>.compile_fail:hover{color:#f00;}.tooltip.should_panic{color:rgba(255,0,0,.8);}.information>.should_panic:hover{color:#f00;}.tooltip.ignore{color:rgba(255,142,0,.6);}.information>.ignore:hover{color:#ff9200;}.search-failed a{color:#0089ff;}.tooltip::after{background-color:#000;color:#fff;border-color:#000;}.tooltip::before{border-color:transparent black transparent transparent;}.notable-traits-tooltiptext{background-color:#111;border-color:#777;}.notable-traits-tooltiptext .notable{border-bottom-color:#d2d2d2;}#titles>button:not(.selected){background-color:#252525;border-top-color:#252525;}#titles>button:hover,#titles>button.selected{border-top-color:#0089ff;background-color:#353535;}#titles>button>div.count{color:#888;}@media (max-width:700px){.sidebar-menu{background-color:#505050;border-bottom-color:#e0e0e0;border-right-color:#e0e0e0;}.sidebar-elems{background-color:#505050;border-right-color:#000;}#sidebar-filler{background-color:#505050;border-bottom-color:#e0e0e0;}}kbd{color:#000;background-color:#fafbfc;border-color:#d1d5da;border-bottom-color:#c6cbd1;box-shadow-color:#c6cbd1;}#theme-picker,#settings-menu,#help-button{border-color:#e0e0e0;background:#f0f0f0;color:#000;}#theme-picker:hover,#theme-picker:focus,#settings-menu:hover,#settings-menu:focus,#help-button:hover,#help-button:focus{border-color:#ffb900;}#copy-path{color:#999;}#copy-path>img{filter:invert(50%);}#copy-path:hover>img{filter:invert(65%);}#theme-choices{border-color:#e0e0e0;background-color:#353535;}#theme-choices>button:not(:first-child){border-top-color:#e0e0e0;}#theme-choices>button:hover,#theme-choices>button:focus{background-color:#4e4e4e;}@media (max-width:700px){#theme-picker{background:#f0f0f0;}}#all-types{background-color:#505050;}#all-types:hover{background-color:#606060;}.search-results .result-name span.alias{color:#fff;}.search-results .result-name span.grey{color:#ccc;}#sidebar-toggle{background-color:#565656;}#sidebar-toggle:hover{background-color:#676767;}#source-sidebar{background-color:#565656;}#source-sidebar>.title{border-bottom-color:#ccc;}div.files>a:hover,div.name:hover{background-color:#444;}div.files>.selected{background-color:#333;}.setting-line>.title{border-bottom-color:#ddd;}.scraped-example .example-wrap .rust span.highlight{background:rgb(91,59,1);}.scraped-example .example-wrap .rust span.highlight.focus{background:rgb(124,75,15);}.scraped-example:not(.expanded) .code-wrapper:before{background:linear-gradient(to bottom,rgba(53,53,53,1),rgba(53,53,53,0));}.scraped-example:not(.expanded) .code-wrapper:after{background:linear-gradient(to top,rgba(53,53,53,1),rgba(53,53,53,0));}.toggle-line-inner{background:#616161;}.toggle-line:hover .toggle-line-inner{background:##898989;}
\ No newline at end of file
diff --git a/ch2/down-arrow.svg b/ch2/down-arrow.svg
new file mode 100644
index 00000000..35437e77
--- /dev/null
+++ b/ch2/down-arrow.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/ch2/favicon-16x16.png b/ch2/favicon-16x16.png
new file mode 100644
index 00000000..ea4b45ca
Binary files /dev/null and b/ch2/favicon-16x16.png differ
diff --git a/ch2/favicon-32x32.png b/ch2/favicon-32x32.png
new file mode 100644
index 00000000..69b8613c
Binary files /dev/null and b/ch2/favicon-32x32.png differ
diff --git a/ch2/favicon.svg b/ch2/favicon.svg
new file mode 100644
index 00000000..8b34b511
--- /dev/null
+++ b/ch2/favicon.svg
@@ -0,0 +1,24 @@
+
diff --git a/ch2/implementors/core/fmt/trait.Write.js b/ch2/implementors/core/fmt/trait.Write.js
new file mode 100644
index 00000000..0d40b97a
--- /dev/null
+++ b/ch2/implementors/core/fmt/trait.Write.js
@@ -0,0 +1,3 @@
+(function() {var implementors = {};
+implementors["os"] = [{"text":"impl Write for Stdout","synthetic":false,"types":["os::console::Stdout"]}];
+if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()
\ No newline at end of file
diff --git a/ch2/implementors/core/marker/trait.Freeze.js b/ch2/implementors/core/marker/trait.Freeze.js
new file mode 100644
index 00000000..ac0e0bcd
--- /dev/null
+++ b/ch2/implementors/core/marker/trait.Freeze.js
@@ -0,0 +1,3 @@
+(function() {var implementors = {};
+implementors["os"] = [{"text":"impl Freeze for Stdout","synthetic":true,"types":["os::console::Stdout"]},{"text":"impl Freeze for KernelStack","synthetic":true,"types":["os::batch::KernelStack"]},{"text":"impl Freeze for UserStack","synthetic":true,"types":["os::batch::UserStack"]},{"text":"impl Freeze for AppManager","synthetic":true,"types":["os::batch::AppManager"]},{"text":"impl Freeze for APP_MANAGER","synthetic":true,"types":["os::batch::APP_MANAGER"]},{"text":"impl<T> !Freeze for UPSafeCell<T>","synthetic":true,"types":["os::sync::up::UPSafeCell"]},{"text":"impl Freeze for TrapContext","synthetic":true,"types":["os::trap::context::TrapContext"]}];
+if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()
\ No newline at end of file
diff --git a/ch2/implementors/core/marker/trait.Send.js b/ch2/implementors/core/marker/trait.Send.js
new file mode 100644
index 00000000..46986f29
--- /dev/null
+++ b/ch2/implementors/core/marker/trait.Send.js
@@ -0,0 +1,3 @@
+(function() {var implementors = {};
+implementors["os"] = [{"text":"impl Send for Stdout","synthetic":true,"types":["os::console::Stdout"]},{"text":"impl Send for KernelStack","synthetic":true,"types":["os::batch::KernelStack"]},{"text":"impl Send for UserStack","synthetic":true,"types":["os::batch::UserStack"]},{"text":"impl Send for AppManager","synthetic":true,"types":["os::batch::AppManager"]},{"text":"impl Send for APP_MANAGER","synthetic":true,"types":["os::batch::APP_MANAGER"]},{"text":"impl<T> Send for UPSafeCell<T> where T: Send, ","synthetic":true,"types":["os::sync::up::UPSafeCell"]},{"text":"impl Send for TrapContext","synthetic":true,"types":["os::trap::context::TrapContext"]}];
+if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()
\ No newline at end of file
diff --git a/ch2/implementors/core/marker/trait.Sync.js b/ch2/implementors/core/marker/trait.Sync.js
new file mode 100644
index 00000000..96089be0
--- /dev/null
+++ b/ch2/implementors/core/marker/trait.Sync.js
@@ -0,0 +1,3 @@
+(function() {var implementors = {};
+implementors["os"] = [{"text":"impl Sync for Stdout","synthetic":true,"types":["os::console::Stdout"]},{"text":"impl Sync for KernelStack","synthetic":true,"types":["os::batch::KernelStack"]},{"text":"impl Sync for UserStack","synthetic":true,"types":["os::batch::UserStack"]},{"text":"impl Sync for AppManager","synthetic":true,"types":["os::batch::AppManager"]},{"text":"impl Sync for APP_MANAGER","synthetic":true,"types":["os::batch::APP_MANAGER"]},{"text":"impl Sync for TrapContext","synthetic":true,"types":["os::trap::context::TrapContext"]},{"text":"impl<T> Sync for UPSafeCell<T>","synthetic":false,"types":["os::sync::up::UPSafeCell"]}];
+if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()
\ No newline at end of file
diff --git a/ch2/implementors/core/marker/trait.Unpin.js b/ch2/implementors/core/marker/trait.Unpin.js
new file mode 100644
index 00000000..4793b426
--- /dev/null
+++ b/ch2/implementors/core/marker/trait.Unpin.js
@@ -0,0 +1,3 @@
+(function() {var implementors = {};
+implementors["os"] = [{"text":"impl Unpin for Stdout","synthetic":true,"types":["os::console::Stdout"]},{"text":"impl Unpin for KernelStack","synthetic":true,"types":["os::batch::KernelStack"]},{"text":"impl Unpin for UserStack","synthetic":true,"types":["os::batch::UserStack"]},{"text":"impl Unpin for AppManager","synthetic":true,"types":["os::batch::AppManager"]},{"text":"impl Unpin for APP_MANAGER","synthetic":true,"types":["os::batch::APP_MANAGER"]},{"text":"impl<T> Unpin for UPSafeCell<T> where T: Unpin, ","synthetic":true,"types":["os::sync::up::UPSafeCell"]},{"text":"impl Unpin for TrapContext","synthetic":true,"types":["os::trap::context::TrapContext"]}];
+if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()
\ No newline at end of file
diff --git a/ch2/implementors/core/ops/deref/trait.Deref.js b/ch2/implementors/core/ops/deref/trait.Deref.js
new file mode 100644
index 00000000..6e0c1389
--- /dev/null
+++ b/ch2/implementors/core/ops/deref/trait.Deref.js
@@ -0,0 +1,3 @@
+(function() {var implementors = {};
+implementors["os"] = [{"text":"impl Deref for APP_MANAGER","synthetic":false,"types":["os::batch::APP_MANAGER"]}];
+if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()
\ No newline at end of file
diff --git a/ch2/implementors/core/panic/unwind_safe/trait.RefUnwindSafe.js b/ch2/implementors/core/panic/unwind_safe/trait.RefUnwindSafe.js
new file mode 100644
index 00000000..871749e2
--- /dev/null
+++ b/ch2/implementors/core/panic/unwind_safe/trait.RefUnwindSafe.js
@@ -0,0 +1,3 @@
+(function() {var implementors = {};
+implementors["os"] = [{"text":"impl RefUnwindSafe for Stdout","synthetic":true,"types":["os::console::Stdout"]},{"text":"impl RefUnwindSafe for KernelStack","synthetic":true,"types":["os::batch::KernelStack"]},{"text":"impl RefUnwindSafe for UserStack","synthetic":true,"types":["os::batch::UserStack"]},{"text":"impl RefUnwindSafe for AppManager","synthetic":true,"types":["os::batch::AppManager"]},{"text":"impl RefUnwindSafe for APP_MANAGER","synthetic":true,"types":["os::batch::APP_MANAGER"]},{"text":"impl<T> !RefUnwindSafe for UPSafeCell<T>","synthetic":true,"types":["os::sync::up::UPSafeCell"]},{"text":"impl RefUnwindSafe for TrapContext","synthetic":true,"types":["os::trap::context::TrapContext"]}];
+if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()
\ No newline at end of file
diff --git a/ch2/implementors/core/panic/unwind_safe/trait.UnwindSafe.js b/ch2/implementors/core/panic/unwind_safe/trait.UnwindSafe.js
new file mode 100644
index 00000000..8631d04b
--- /dev/null
+++ b/ch2/implementors/core/panic/unwind_safe/trait.UnwindSafe.js
@@ -0,0 +1,3 @@
+(function() {var implementors = {};
+implementors["os"] = [{"text":"impl UnwindSafe for Stdout","synthetic":true,"types":["os::console::Stdout"]},{"text":"impl UnwindSafe for KernelStack","synthetic":true,"types":["os::batch::KernelStack"]},{"text":"impl UnwindSafe for UserStack","synthetic":true,"types":["os::batch::UserStack"]},{"text":"impl UnwindSafe for AppManager","synthetic":true,"types":["os::batch::AppManager"]},{"text":"impl UnwindSafe for APP_MANAGER","synthetic":true,"types":["os::batch::APP_MANAGER"]},{"text":"impl<T> UnwindSafe for UPSafeCell<T> where T: UnwindSafe, ","synthetic":true,"types":["os::sync::up::UPSafeCell"]},{"text":"impl UnwindSafe for TrapContext","synthetic":true,"types":["os::trap::context::TrapContext"]}];
+if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()
\ No newline at end of file
diff --git a/ch2/implementors/lazy_static/trait.LazyStatic.js b/ch2/implementors/lazy_static/trait.LazyStatic.js
new file mode 100644
index 00000000..c2f8b3d4
--- /dev/null
+++ b/ch2/implementors/lazy_static/trait.LazyStatic.js
@@ -0,0 +1,3 @@
+(function() {var implementors = {};
+implementors["os"] = [{"text":"impl LazyStatic for APP_MANAGER","synthetic":false,"types":["os::batch::APP_MANAGER"]}];
+if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()
\ No newline at end of file
diff --git a/ch2/light.css b/ch2/light.css
new file mode 100644
index 00000000..e8cf0741
--- /dev/null
+++ b/ch2/light.css
@@ -0,0 +1 @@
+ body{background-color:white;color:black;}h1,h2,h3,h4{color:black;}h1.fqn{border-bottom-color:#DDDDDD;}h2,h3,h4{border-bottom-color:#DDDDDD;}.in-band{background-color:white;}.invisible{background:rgba(0,0,0,0);}.docblock code,.docblock-short code{background-color:#F5F5F5;}pre,.rustdoc.source .example-wrap{background-color:#F5F5F5;}.sidebar{background-color:#F5F5F5;}*{scrollbar-color:rgba(36,37,39,0.6) #e6e6e6;}.sidebar{scrollbar-color:rgba(36,37,39,0.6) #d9d9d9;}.rust-logo{}::-webkit-scrollbar-track{background-color:#ecebeb;}::-webkit-scrollbar-thumb{background-color:rgba(36,37,39,0.6);}.sidebar::-webkit-scrollbar-track{background-color:#dcdcdc;}.sidebar::-webkit-scrollbar-thumb{background-color:rgba(36,37,39,0.6);}.sidebar .current{background-color:#fff;}.source .sidebar{background-color:#f1f1f1;}.sidebar .location{border-color:#000;background-color:#fff;color:#333;}.sidebar .version{border-bottom-color:#DDD;}.sidebar-title{border-top-color:#777;border-bottom-color:#777;}.block a:hover{background:#F5F5F5;}.line-numbers span{color:#c67e2d;}.line-numbers .line-highlighted{background-color:#FDFFD3 !important;}.docblock h1,.docblock h2,.docblock h3,.docblock h4,.docblock h5,.docblock h6{border-bottom-color:#ddd;}.docblock table td,.docblock table th{border-color:#ddd;}.content .method .where,.content .fn .where,.content .where.fmt-newline{color:#4E4C4C;}.search-results a:hover{background-color:#ddd;}.search-results a:focus{color:#000 !important;background-color:#ccc;}.search-results a:focus span{color:#000 !important;}a.result-trait:focus{background-color:#c7b6ff;}a.result-traitalias:focus{background-color:#c7b6ff;}a.result-mod:focus,a.result-externcrate:focus{background-color:#afc6e4;}a.result-enum:focus{background-color:#e7b1a0;}a.result-struct:focus{background-color:#e7b1a0;}a.result-union:focus{background-color:#e7b1a0;}a.result-fn:focus,a.result-method:focus,a.result-tymethod:focus{background-color:#c6afb3;}a.result-type:focus{background-color:#e7b1a0;}a.result-associatedtype:focus{background-color:#afc6e4;}a.result-foreigntype:focus{background-color:#e7b1a0;}a.result-attr:focus,a.result-derive:focus,a.result-macro:focus{background-color:#8ce488;}a.result-constant:focus,a.result-static:focus{background-color:#afc6e4;}a.result-primitive:focus{background-color:#e7b1a0;}a.result-keyword:focus{background-color:#afc6e4;}.content .item-info::before{color:#ccc;}.content span.enum,.content a.enum,.block a.current.enum{color:#AD378A;}.content span.struct,.content a.struct,.block a.current.struct{color:#AD378A;}.content span.type,.content a.type,.block a.current.type{color:#AD378A;}.content span.foreigntype,.content a.foreigntype,.block a.current.foreigntype{color:#3873AD;}.content span.associatedtype,.content a.associatedtype,.block a.current.associatedtype{color:#3873AD;}.content span.attr,.content a.attr,.block a.current.attr,.content span.derive,.content a.derive,.block a.current.derive,.content span.macro,.content a.macro,.block a.current.macro{color:#068000;}.content span.union,.content a.union,.block a.current.union{color:#AD378A;}.content span.constant,.content a.constant,.block a.current.constant,.content span.static,.content a.static,.block a.current.static{color:#3873AD;}.content span.primitive,.content a.primitive,.block a.current.primitive{color:#AD378A;}.content span.externcrate,.content span.mod,.content a.mod,.block a.current.mod{color:#3873AD;}.content span.trait,.content a.trait,.block a.current.trait{color:#6E4FC9;}.content span.traitalias,.content a.traitalias,.block a.current.traitalias{color:#5137AD;}.content span.fn,.content a.fn,.block a.current.fn,.content span.method,.content a.method,.block a.current.method,.content span.tymethod,.content a.tymethod,.block a.current.tymethod,.content .fnname{color:#AD7C37;}.content span.keyword,.content a.keyword,.block a.current.keyword{color:#3873AD;}nav:not(.sidebar){border-bottom-color:#e0e0e0;}nav.main .current{border-top-color:#000;border-bottom-color:#000;}nav.main .separator{border:1px solid #000;}a{color:#3873AD;}a#toggle-all-docs,a.anchor,.small-section-header a,#source-sidebar a,pre.rust a,.sidebar a,.in-band a{color:#000;}.search-results a{color:initial;}a.test-arrow{color:#f5f5f5;}body.source .example-wrap pre.rust a{background:#eee;}details.rustdoc-toggle>summary.hideme>span,details.rustdoc-toggle>summary::before,details.undocumented>summary::before{color:#999;}#crate-search{color:#555;background-color:white;border-color:#e0e0e0;box-shadow:0 0 0 1px #e0e0e0,0 0 0 2px transparent;}.search-input{color:#555;background-color:white;box-shadow:0 0 0 1px #e0e0e0,0 0 0 2px transparent;}.search-input:focus{border-color:#66afe9;}#crate-search+.search-input:focus{box-shadow:0 0 8px #078dd8;}.module-item .stab,.import-item .stab{color:#000;}.stab.unstable{background:#FFF5D6;border-color:#FFC600;}.stab.deprecated{background:#ffc4c4;border-color:#db7b7b;}.stab.portability{background:#F3DFFF;border-color:#b07bdb;}.stab.portability>code{background:none;}#help>div{background:#e9e9e9;border-color:#bfbfbf;}#help span.bottom,#help span.top{border-color:#bfbfbf;}.rightside,.out-of-band{color:grey;}.result-name .primitive>i,.result-name .keyword>i{color:black;}.line-numbers :target{background-color:transparent;}pre.rust .kw{color:#8959A8;}pre.rust .kw-2,pre.rust .prelude-ty{color:#4271AE;}pre.rust .number,pre.rust .string{color:#718C00;}pre.rust .self,pre.rust .bool-val,pre.rust .prelude-val,pre.rust .attribute,pre.rust .attribute .ident{color:#C82829;}pre.rust .comment{color:#8E908C;}pre.rust .doccomment{color:#4D4D4C;}pre.rust .macro,pre.rust .macro-nonterminal{color:#3E999F;}pre.rust .lifetime{color:#B76514;}pre.rust .question-mark{color:#ff9011;}.example-wrap>pre.line-number{border-color:#c7c7c7;}a.test-arrow{background-color:rgb(78,139,202,0.2);}a.test-arrow:hover{background-color:#4e8bca;}.toggle-label,.code-attribute{color:#999;}:target{background:#FDFFD3;border-right:3px solid #AD7C37;}pre.compile_fail{border-left:2px solid rgba(255,0,0,.5);}pre.compile_fail:hover,.information:hover+pre.compile_fail{border-left:2px solid #f00;}pre.should_panic{border-left:2px solid rgba(255,0,0,.5);}pre.should_panic:hover,.information:hover+pre.should_panic{border-left:2px solid #f00;}pre.ignore{border-left:2px solid rgba(255,142,0,.6);}pre.ignore:hover,.information:hover+pre.ignore{border-left:2px solid #ff9200;}.tooltip.compile_fail{color:rgba(255,0,0,.5);}.information>.compile_fail:hover{color:#f00;}.tooltip.should_panic{color:rgba(255,0,0,.5);}.information>.should_panic:hover{color:#f00;}.tooltip.ignore{color:rgba(255,142,0,.6);}.information>.ignore:hover{color:#ff9200;}.search-failed a{color:#3873AD;}.tooltip::after{background-color:#000;color:#fff;}.tooltip::before{border-color:transparent black transparent transparent;}.notable-traits-tooltiptext{background-color:#eee;border-color:#999;}.notable-traits-tooltiptext .notable{border-bottom-color:#DDDDDD;}#titles>button:not(.selected){background-color:#e6e6e6;border-top-color:#e6e6e6;}#titles>button:hover,#titles>button.selected{background-color:#ffffff;border-top-color:#0089ff;}#titles>button>div.count{color:#888;}@media (max-width:700px){.sidebar-menu{background-color:#F5F5F5;border-bottom-color:#e0e0e0;border-right-color:#e0e0e0;}.sidebar-elems{background-color:#F5F5F5;border-right-color:#000;}#sidebar-filler{background-color:#F5F5F5;border-bottom-color:#e0e0e0;}}kbd{color:#000;background-color:#fafbfc;border-color:#d1d5da;border-bottom-color:#c6cbd1;box-shadow-color:#c6cbd1;}#theme-picker,#settings-menu,#help-button{border-color:#e0e0e0;background-color:#fff;}#theme-picker:hover,#theme-picker:focus,#settings-menu:hover,#settings-menu:focus,#help-button:hover,#help-button:focus{border-color:#717171;}#copy-path{color:#999;}#copy-path>img{filter:invert(50%);}#copy-path:hover>img{filter:invert(35%);}#theme-choices{border-color:#ccc;background-color:#fff;}#theme-choices>button:not(:first-child){border-top-color:#e0e0e0;}#theme-choices>button:hover,#theme-choices>button:focus{background-color:#eee;}@media (max-width:700px){#theme-picker{background:#fff;}}#all-types{background-color:#fff;}#all-types:hover{background-color:#f9f9f9;}.search-results .result-name span.alias{color:#000;}.search-results .result-name span.grey{color:#999;}#sidebar-toggle{background-color:#F5F5F5;}#sidebar-toggle:hover{background-color:#E0E0E0;}#source-sidebar{background-color:#F5F5F5;}#source-sidebar>.title{border-bottom-color:#ccc;}div.files>a:hover,div.name:hover{background-color:#E0E0E0;}div.files>.selected{background-color:#fff;}.setting-line>.title{border-bottom-color:#D5D5D5;}
\ No newline at end of file
diff --git a/ch2/main.js b/ch2/main.js
new file mode 100644
index 00000000..3a235b2a
--- /dev/null
+++ b/ch2/main.js
@@ -0,0 +1,8 @@
+if(!String.prototype.startsWith){String.prototype.startsWith=function(searchString,position){position=position||0;return this.indexOf(searchString,position)===position}}if(!String.prototype.endsWith){String.prototype.endsWith=function(suffix,length){var l=length||this.length;return this.indexOf(suffix,l-suffix.length)!==-1}}if(!DOMTokenList.prototype.add){DOMTokenList.prototype.add=function(className){if(className&&!hasClass(this,className)){if(this.className&&this.className.length>0){this.className+=" "+className}else{this.className=className}}}}if(!DOMTokenList.prototype.remove){DOMTokenList.prototype.remove=function(className){if(className&&this.className){this.className=(" "+this.className+" ").replace(" "+className+" "," ").trim()}}}function getVar(name){var el=document.getElementById("rustdoc-vars");if(el){return el.attributes["data-"+name].value}else{return null}}function resourcePath(basename,extension){return getVar("root-path")+basename+getVar("resource-suffix")+extension}(function(){window.rootPath=getVar("root-path");window.currentCrate=getVar("current-crate");window.searchJS=resourcePath("search",".js");window.searchIndexJS=resourcePath("search-index",".js");var sidebarVars=document.getElementById("sidebar-vars");if(sidebarVars){window.sidebarCurrent={name:sidebarVars.attributes["data-name"].value,ty:sidebarVars.attributes["data-ty"].value,relpath:sidebarVars.attributes["data-relpath"].value,}}}());function getVirtualKey(ev){if("key"in ev&&typeof ev.key!="undefined"){return ev.key}var c=ev.charCode||ev.keyCode;if(c==27){return"Escape"}return String.fromCharCode(c)}var THEME_PICKER_ELEMENT_ID="theme-picker";var THEMES_ELEMENT_ID="theme-choices";var MAIN_ID="main-content";function getThemesElement(){return document.getElementById(THEMES_ELEMENT_ID)}function getThemePickerElement(){return document.getElementById(THEME_PICKER_ELEMENT_ID)}function getNakedUrl(){return window.location.href.split("?")[0].split("#")[0]}function showThemeButtonState(){var themePicker=getThemePickerElement();var themeChoices=getThemesElement();themeChoices.style.display="block";themePicker.style.borderBottomRightRadius="0";themePicker.style.borderBottomLeftRadius="0"}function hideThemeButtonState(){var themePicker=getThemePickerElement();var themeChoices=getThemesElement();themeChoices.style.display="none";themePicker.style.borderBottomRightRadius="3px";themePicker.style.borderBottomLeftRadius="3px"}(function(){if(!document.location.href.startsWith("file:///")){return}var themeChoices=getThemesElement();var themePicker=getThemePickerElement();var availableThemes=getVar("themes").split(",");removeClass(themeChoices.parentElement,"hidden");function switchThemeButtonState(){if(themeChoices.style.display==="block"){hideThemeButtonState()}else{showThemeButtonState()}}function handleThemeButtonsBlur(e){var active=document.activeElement;var related=e.relatedTarget;if(active.id!==THEME_PICKER_ELEMENT_ID&&(!active.parentNode||active.parentNode.id!==THEMES_ELEMENT_ID)&&(!related||(related.id!==THEME_PICKER_ELEMENT_ID&&(!related.parentNode||related.parentNode.id!==THEMES_ELEMENT_ID)))){hideThemeButtonState()}}themePicker.onclick=switchThemeButtonState;themePicker.onblur=handleThemeButtonsBlur;availableThemes.forEach(function(item){var but=document.createElement("button");but.textContent=item;but.onclick=function(){switchTheme(window.currentTheme,window.mainTheme,item,true);useSystemTheme(false)};but.onblur=handleThemeButtonsBlur;themeChoices.appendChild(but)})}());(function(){"use strict";window.searchState={loadingText:"Loading search results...",input:document.getElementsByClassName("search-input")[0],outputElement:function(){return document.getElementById("search")},title:document.title,titleBeforeSearch:document.title,timeout:null,currentTab:0,focusedByTab:[null,null,null],clearInputTimeout:function(){if(searchState.timeout!==null){clearTimeout(searchState.timeout);searchState.timeout=null}},focus:function(){searchState.input.focus()},defocus:function(){searchState.input.blur()},showResults:function(search){if(search===null||typeof search==='undefined'){search=searchState.outputElement()}addClass(main,"hidden");removeClass(search,"hidden");searchState.mouseMovedAfterSearch=false;document.title=searchState.title},hideResults:function(search){if(search===null||typeof search==='undefined'){search=searchState.outputElement()}addClass(search,"hidden");removeClass(main,"hidden");document.title=searchState.titleBeforeSearch;if(searchState.browserSupportsHistoryApi()){history.replaceState("",window.currentCrate+" - Rust",getNakedUrl()+window.location.hash)}},getQueryStringParams:function(){var params={};window.location.search.substring(1).split("&").map(function(s){var pair=s.split("=");params[decodeURIComponent(pair[0])]=typeof pair[1]==="undefined"?null:decodeURIComponent(pair[1])});return params},putBackSearch:function(search_input){var search=searchState.outputElement();if(search_input.value!==""&&hasClass(search,"hidden")){searchState.showResults(search);if(searchState.browserSupportsHistoryApi()){var extra="?search="+encodeURIComponent(search_input.value);history.replaceState(search_input.value,"",getNakedUrl()+extra+window.location.hash)}document.title=searchState.title}},browserSupportsHistoryApi:function(){return window.history&&typeof window.history.pushState==="function"},setup:function(){var search_input=searchState.input;if(!searchState.input){return}function loadScript(url){var script=document.createElement('script');script.src=url;document.head.append(script)}var searchLoaded=false;function loadSearch(){if(!searchLoaded){searchLoaded=true;loadScript(window.searchJS);loadScript(window.searchIndexJS)}}search_input.addEventListener("focus",function(){searchState.putBackSearch(this);search_input.origPlaceholder=searchState.input.placeholder;search_input.placeholder="Type your search here.";loadSearch()});search_input.addEventListener("blur",function(){search_input.placeholder=searchState.input.origPlaceholder});if(search_input.value!=''){loadSearch()}var params=searchState.getQueryStringParams();if(params.search!==undefined){var search=searchState.outputElement();search.innerHTML="
"+searchState.loadingText+"
";searchState.showResults(search);loadSearch()}},};function getPageId(){if(window.location.hash){var tmp=window.location.hash.replace(/^#/,"");if(tmp.length>0){return tmp}}return null}function showSidebar(){var elems=document.getElementsByClassName("sidebar-elems")[0];if(elems){addClass(elems,"show-it")}var sidebar=document.getElementsByClassName("sidebar")[0];if(sidebar){addClass(sidebar,"mobile");var filler=document.getElementById("sidebar-filler");if(!filler){var div=document.createElement("div");div.id="sidebar-filler";sidebar.appendChild(div)}}}function hideSidebar(){var elems=document.getElementsByClassName("sidebar-elems")[0];if(elems){removeClass(elems,"show-it")}var sidebar=document.getElementsByClassName("sidebar")[0];removeClass(sidebar,"mobile");var filler=document.getElementById("sidebar-filler");if(filler){filler.remove()}document.getElementsByTagName("body")[0].style.marginTop=""}var toggleAllDocsId="toggle-all-docs";var main=document.getElementById(MAIN_ID);var savedHash="";function handleHashes(ev){var elem;var search=searchState.outputElement();if(ev!==null&&search&&!hasClass(search,"hidden")&&ev.newURL){searchState.hideResults(search);var hash=ev.newURL.slice(ev.newURL.indexOf("#")+1);if(searchState.browserSupportsHistoryApi()){history.replaceState(hash,"",getNakedUrl()+window.location.search+"#"+hash)}elem=document.getElementById(hash);if(elem){elem.scrollIntoView()}}if(savedHash!==window.location.hash){savedHash=window.location.hash;if(savedHash.length===0){return}expandSection(savedHash.slice(1))}}function onHashChange(ev){hideSidebar();handleHashes(ev)}function openParentDetails(elem){while(elem){if(elem.tagName==="DETAILS"){elem.open=true}elem=elem.parentNode}}function expandSection(id){openParentDetails(document.getElementById(id))}function getHelpElement(build){if(build){buildHelperPopup()}return document.getElementById("help")}function displayHelp(display,ev,help){if(display){help=help?help:getHelpElement(true);if(hasClass(help,"hidden")){ev.preventDefault();removeClass(help,"hidden");addClass(document.body,"blur")}}else{help=help?help:getHelpElement(false);if(help&&!hasClass(help,"hidden")){ev.preventDefault();addClass(help,"hidden");removeClass(document.body,"blur")}}}function handleEscape(ev){var help=getHelpElement(false);var search=searchState.outputElement();if(help&&!hasClass(help,"hidden")){displayHelp(false,ev,help)}else if(search&&!hasClass(search,"hidden")){searchState.clearInputTimeout();ev.preventDefault();searchState.hideResults(search)}searchState.defocus();hideThemeButtonState()}var disableShortcuts=getSettingValue("disable-shortcuts")==="true";function handleShortcut(ev){if(ev.ctrlKey||ev.altKey||ev.metaKey||disableShortcuts){return}if(document.activeElement.tagName==="INPUT"){switch(getVirtualKey(ev)){case"Escape":handleEscape(ev);break}}else{switch(getVirtualKey(ev)){case"Escape":handleEscape(ev);break;case"s":case"S":displayHelp(false,ev);ev.preventDefault();searchState.focus();break;case"+":case"-":ev.preventDefault();toggleAllDocs();break;case"?":displayHelp(true,ev);break;case"t":case"T":displayHelp(false,ev);ev.preventDefault();var themePicker=getThemePickerElement();themePicker.click();themePicker.focus();break;default:if(getThemePickerElement().parentNode.contains(ev.target)){handleThemeKeyDown(ev)}}}}function handleThemeKeyDown(ev){var active=document.activeElement;var themes=getThemesElement();switch(getVirtualKey(ev)){case"ArrowUp":ev.preventDefault();if(active.previousElementSibling&&ev.target.id!==THEME_PICKER_ELEMENT_ID){active.previousElementSibling.focus()}else{showThemeButtonState();themes.lastElementChild.focus()}break;case"ArrowDown":ev.preventDefault();if(active.nextElementSibling&&ev.target.id!==THEME_PICKER_ELEMENT_ID){active.nextElementSibling.focus()}else{showThemeButtonState();themes.firstElementChild.focus()}break;case"Enter":case"Return":case"Space":if(ev.target.id===THEME_PICKER_ELEMENT_ID&&themes.style.display==="none"){ev.preventDefault();showThemeButtonState();themes.firstElementChild.focus()}break;case"Home":ev.preventDefault();themes.firstElementChild.focus();break;case"End":ev.preventDefault();themes.lastElementChild.focus();break}}document.addEventListener("keypress",handleShortcut);document.addEventListener("keydown",handleShortcut);(function(){var x=document.getElementsByClassName("version-selector");if(x.length>0){x[0].onchange=function(){var i,match,url=document.location.href,stripped="",len=window.rootPath.match(/\.\.\//g).length+1;for(i=0;iCrates";var ul=document.createElement("ul");div.appendChild(ul);for(var i=0;i .in-band > .trait").textContent;var baseIdName="impl-"+traitName+"-";var libs=Object.getOwnPropertyNames(imp);for(var i=0,llength=libs.length;i summary:not(.hideme)"),function(el){el.addEventListener("click",function(e){if(e.target.tagName!="SUMMARY"&&e.target.tagName!="A"){e.preventDefault()}})});onEachLazy(document.getElementsByClassName("notable-traits"),function(e){e.onclick=function(){this.getElementsByClassName('notable-traits-tooltiptext')[0].classList.toggle("force-tooltip")}});var sidebar_menu=document.getElementsByClassName("sidebar-menu")[0];if(sidebar_menu){sidebar_menu.onclick=function(){var sidebar=document.getElementsByClassName("sidebar")[0];if(hasClass(sidebar,"mobile")){hideSidebar()}else{showSidebar()}}}var buildHelperPopup=function(){var popup=document.createElement("aside");addClass(popup,"hidden");popup.id="help";popup.addEventListener("click",function(ev){if(ev.target===popup){displayHelp(false,ev)}});var book_info=document.createElement("span");book_info.className="top";book_info.innerHTML="You can find more information in \
+ the rustdoc book.";var container=document.createElement("div");var shortcuts=[["?","Show this help dialog"],["S","Focus the search field"],["T","Focus the theme picker menu"],["↑","Move up in search results"],["↓","Move down in search results"],["← / →","Switch result tab (when results focused)"],["⏎","Go to active search result"],["+","Expand all sections"],["-","Collapse all sections"],].map(function(x){return"
";var infos=["Prefix searches with a type followed by a colon (e.g., fn:) to \
+ restrict the search to a given item kind.","Accepted kinds are: fn, mod, struct, \
+ enum, trait, type, macro, \
+ and const.","Search functions by type signature (e.g., vec -> usize or \
+ * -> vec)","Search multiple things at once by splitting your query with comma (e.g., \
+ str,u8 or String,struct:Vec,test)","You can look for items with an exact name by putting double quotes around \
+ your request: \"string\"","Look for items inside another one by searching for a path: vec::Vec",].map(function(x){return"
"+infos;container.appendChild(book_info);container.appendChild(div_shortcuts);container.appendChild(div_infos);var rustdoc_version=document.createElement("span");rustdoc_version.className="bottom";var rustdoc_version_code=document.createElement("code");rustdoc_version_code.innerText="rustdoc "+getVar("rustdoc-version");rustdoc_version.appendChild(rustdoc_version_code);container.appendChild(rustdoc_version);popup.appendChild(container);insertAfter(popup,document.querySelector("main"));buildHelperPopup=function(){}};onHashChange(null);window.addEventListener("hashchange",onHashChange);searchState.setup()}());(function(){var reset_button_timeout=null;window.copy_path=function(but){var parent=but.parentElement;var path=[];onEach(parent.childNodes,function(child){if(child.tagName==='A'){path.push(child.textContent)}});var el=document.createElement('textarea');el.value=path.join('::');el.setAttribute('readonly','');el.style.position='absolute';el.style.left='-9999px';document.body.appendChild(el);el.select();document.execCommand('copy');document.body.removeChild(el);but.children[0].style.display='none';var tmp;if(but.childNodes.length<2){tmp=document.createTextNode('✓');but.appendChild(tmp)}else{onEachLazy(but.childNodes,function(e){if(e.nodeType===Node.TEXT_NODE){tmp=e;return true}});tmp.textContent='✓'}if(reset_button_timeout!==null){window.clearTimeout(reset_button_timeout)}function reset_button(){tmp.textContent='';reset_button_timeout=null;but.children[0].style.display=""}reset_button_timeout=window.setTimeout(reset_button,1000)}}())
\ No newline at end of file
diff --git a/ch2/normalize.css b/ch2/normalize.css
new file mode 100644
index 00000000..469959f1
--- /dev/null
+++ b/ch2/normalize.css
@@ -0,0 +1,2 @@
+ /*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */
+html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type="button"],[type="reset"],[type="submit"],button{-webkit-appearance:button}[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}
\ No newline at end of file
diff --git a/ch2/noscript.css b/ch2/noscript.css
new file mode 100644
index 00000000..8ad88640
--- /dev/null
+++ b/ch2/noscript.css
@@ -0,0 +1 @@
+ #main-content .attributes{margin-left:0 !important;}#copy-path{display:none;}.sub{display:none;}#theme-picker{display:none;}
\ No newline at end of file
diff --git a/ch2/os/all.html b/ch2/os/all.html
new file mode 100644
index 00000000..928a1bec
--- /dev/null
+++ b/ch2/os/all.html
@@ -0,0 +1,5 @@
+List of all items in this crate
+
+
\ No newline at end of file
diff --git a/ch2/os/batch/constant.APP_BASE_ADDRESS.html b/ch2/os/batch/constant.APP_BASE_ADDRESS.html
new file mode 100644
index 00000000..86b30e48
--- /dev/null
+++ b/ch2/os/batch/constant.APP_BASE_ADDRESS.html
@@ -0,0 +1,6 @@
+APP_BASE_ADDRESS in os::batch - Rust
+
+
\ No newline at end of file
diff --git a/ch2/os/batch/constant.APP_SIZE_LIMIT.html b/ch2/os/batch/constant.APP_SIZE_LIMIT.html
new file mode 100644
index 00000000..5b6892ee
--- /dev/null
+++ b/ch2/os/batch/constant.APP_SIZE_LIMIT.html
@@ -0,0 +1,6 @@
+APP_SIZE_LIMIT in os::batch - Rust
+
+
\ No newline at end of file
diff --git a/ch2/os/batch/constant.KERNEL_STACK_SIZE.html b/ch2/os/batch/constant.KERNEL_STACK_SIZE.html
new file mode 100644
index 00000000..51b6e54c
--- /dev/null
+++ b/ch2/os/batch/constant.KERNEL_STACK_SIZE.html
@@ -0,0 +1,6 @@
+KERNEL_STACK_SIZE in os::batch - Rust
+
+
\ No newline at end of file
diff --git a/ch2/os/batch/constant.MAX_APP_NUM.html b/ch2/os/batch/constant.MAX_APP_NUM.html
new file mode 100644
index 00000000..1ab86b96
--- /dev/null
+++ b/ch2/os/batch/constant.MAX_APP_NUM.html
@@ -0,0 +1,6 @@
+MAX_APP_NUM in os::batch - Rust
+
+
\ No newline at end of file
diff --git a/ch2/os/batch/constant.USER_STACK_SIZE.html b/ch2/os/batch/constant.USER_STACK_SIZE.html
new file mode 100644
index 00000000..c1a1a9a7
--- /dev/null
+++ b/ch2/os/batch/constant.USER_STACK_SIZE.html
@@ -0,0 +1,6 @@
+USER_STACK_SIZE in os::batch - Rust
+
+
\ No newline at end of file
diff --git a/ch2/os/batch/fn.init.html b/ch2/os/batch/fn.init.html
new file mode 100644
index 00000000..cf06e0bb
--- /dev/null
+++ b/ch2/os/batch/fn.init.html
@@ -0,0 +1,6 @@
+init in os::batch - Rust
+
+
\ No newline at end of file
diff --git a/ch2/os/batch/fn.print_app_info.html b/ch2/os/batch/fn.print_app_info.html
new file mode 100644
index 00000000..97f857bf
--- /dev/null
+++ b/ch2/os/batch/fn.print_app_info.html
@@ -0,0 +1,6 @@
+print_app_info in os::batch - Rust
+
+
\ No newline at end of file
diff --git a/ch2/os/batch/fn.run_next_app.html b/ch2/os/batch/fn.run_next_app.html
new file mode 100644
index 00000000..c8fa8d3c
--- /dev/null
+++ b/ch2/os/batch/fn.run_next_app.html
@@ -0,0 +1,6 @@
+run_next_app in os::batch - Rust
+
+
\ No newline at end of file
diff --git a/ch2/os/batch/index.html b/ch2/os/batch/index.html
new file mode 100644
index 00000000..ef8e8611
--- /dev/null
+++ b/ch2/os/batch/index.html
@@ -0,0 +1,10 @@
+os::batch - Rust
+
+
\ No newline at end of file
diff --git a/ch2/os/batch/sidebar-items.js b/ch2/os/batch/sidebar-items.js
new file mode 100644
index 00000000..c3c891ba
--- /dev/null
+++ b/ch2/os/batch/sidebar-items.js
@@ -0,0 +1 @@
+initSidebarItems({"constant":[["APP_BASE_ADDRESS",""],["APP_SIZE_LIMIT",""],["KERNEL_STACK_SIZE",""],["MAX_APP_NUM",""],["USER_STACK_SIZE",""]],"fn":[["init",""],["print_app_info",""],["run_next_app",""]],"static":[["KERNEL_STACK",""],["USER_STACK",""]],"struct":[["APP_MANAGER",""],["AppManager",""],["KernelStack",""],["UserStack",""]]});
\ No newline at end of file
diff --git a/ch2/os/batch/static.KERNEL_STACK.html b/ch2/os/batch/static.KERNEL_STACK.html
new file mode 100644
index 00000000..eaad9f21
--- /dev/null
+++ b/ch2/os/batch/static.KERNEL_STACK.html
@@ -0,0 +1,6 @@
+KERNEL_STACK in os::batch - Rust
+
+
\ No newline at end of file
diff --git a/ch2/os/batch/static.USER_STACK.html b/ch2/os/batch/static.USER_STACK.html
new file mode 100644
index 00000000..41f8750b
--- /dev/null
+++ b/ch2/os/batch/static.USER_STACK.html
@@ -0,0 +1,6 @@
+USER_STACK in os::batch - Rust
+
+
\ No newline at end of file
diff --git a/ch2/os/batch/struct.APP_MANAGER.html b/ch2/os/batch/struct.APP_MANAGER.html
new file mode 100644
index 00000000..2f07f53c
--- /dev/null
+++ b/ch2/os/batch/struct.APP_MANAGER.html
@@ -0,0 +1,20 @@
+APP_MANAGER in os::batch - Rust
+
+
\ No newline at end of file
diff --git a/ch2/os/batch/struct.AppManager.html b/ch2/os/batch/struct.AppManager.html
new file mode 100644
index 00000000..f4647541
--- /dev/null
+++ b/ch2/os/batch/struct.AppManager.html
@@ -0,0 +1,19 @@
+AppManager in os::batch - Rust
+
+
\ No newline at end of file
diff --git a/ch2/os/batch/struct.KernelStack.html b/ch2/os/batch/struct.KernelStack.html
new file mode 100644
index 00000000..3a77e4d4
--- /dev/null
+++ b/ch2/os/batch/struct.KernelStack.html
@@ -0,0 +1,17 @@
+KernelStack in os::batch - Rust
+
+
\ No newline at end of file
diff --git a/ch2/os/batch/struct.UserStack.html b/ch2/os/batch/struct.UserStack.html
new file mode 100644
index 00000000..f7db5e81
--- /dev/null
+++ b/ch2/os/batch/struct.UserStack.html
@@ -0,0 +1,17 @@
+UserStack in os::batch - Rust
+
+
\ No newline at end of file
diff --git a/ch2/os/console/fn.print.html b/ch2/os/console/fn.print.html
new file mode 100644
index 00000000..11eb46a6
--- /dev/null
+++ b/ch2/os/console/fn.print.html
@@ -0,0 +1,6 @@
+print in os::console - Rust
+
+
\ No newline at end of file
diff --git a/ch2/os/console/index.html b/ch2/os/console/index.html
new file mode 100644
index 00000000..20aa4929
--- /dev/null
+++ b/ch2/os/console/index.html
@@ -0,0 +1,8 @@
+os::console - Rust
+
+
\ No newline at end of file
diff --git a/ch2/os/console/sidebar-items.js b/ch2/os/console/sidebar-items.js
new file mode 100644
index 00000000..32906922
--- /dev/null
+++ b/ch2/os/console/sidebar-items.js
@@ -0,0 +1 @@
+initSidebarItems({"fn":[["print",""]],"struct":[["Stdout",""]]});
\ No newline at end of file
diff --git a/ch2/os/console/struct.Stdout.html b/ch2/os/console/struct.Stdout.html
new file mode 100644
index 00000000..aacab1d0
--- /dev/null
+++ b/ch2/os/console/struct.Stdout.html
@@ -0,0 +1,19 @@
+Stdout in os::console - Rust
+
+
\ No newline at end of file
diff --git a/ch2/os/fn.clear_bss.html b/ch2/os/fn.clear_bss.html
new file mode 100644
index 00000000..67c8e8d4
--- /dev/null
+++ b/ch2/os/fn.clear_bss.html
@@ -0,0 +1,6 @@
+clear_bss in os - Rust
+
+
\ No newline at end of file
diff --git a/ch2/os/fn.rust_main.html b/ch2/os/fn.rust_main.html
new file mode 100644
index 00000000..8778f994
--- /dev/null
+++ b/ch2/os/fn.rust_main.html
@@ -0,0 +1,7 @@
+rust_main in os - Rust
+
+
\ No newline at end of file
diff --git a/ch2/os/index.html b/ch2/os/index.html
new file mode 100644
index 00000000..99848c4d
--- /dev/null
+++ b/ch2/os/index.html
@@ -0,0 +1,9 @@
+os - Rust
+
+
\ No newline at end of file
diff --git a/ch2/os/lang_items/fn.panic.html b/ch2/os/lang_items/fn.panic.html
new file mode 100644
index 00000000..4109a3bb
--- /dev/null
+++ b/ch2/os/lang_items/fn.panic.html
@@ -0,0 +1,6 @@
+panic in os::lang_items - Rust
+
+
\ No newline at end of file
diff --git a/ch2/os/lang_items/index.html b/ch2/os/lang_items/index.html
new file mode 100644
index 00000000..c333ed12
--- /dev/null
+++ b/ch2/os/lang_items/index.html
@@ -0,0 +1,7 @@
+os::lang_items - Rust
+
+
+
+
\ No newline at end of file
diff --git a/ch2/os/macro.print.html b/ch2/os/macro.print.html
new file mode 100644
index 00000000..17d519f7
--- /dev/null
+++ b/ch2/os/macro.print.html
@@ -0,0 +1,9 @@
+print in os - Rust
+
+
+
+
\ No newline at end of file
diff --git a/ch2/os/macro.println.html b/ch2/os/macro.println.html
new file mode 100644
index 00000000..6f58012d
--- /dev/null
+++ b/ch2/os/macro.println.html
@@ -0,0 +1,9 @@
+println in os - Rust
+
+
\ No newline at end of file
diff --git a/ch2/os/sbi/constant.SBI_CLEAR_IPI.html b/ch2/os/sbi/constant.SBI_CLEAR_IPI.html
new file mode 100644
index 00000000..c191974c
--- /dev/null
+++ b/ch2/os/sbi/constant.SBI_CLEAR_IPI.html
@@ -0,0 +1,6 @@
+SBI_CLEAR_IPI in os::sbi - Rust
+
+
\ No newline at end of file
diff --git a/ch2/os/sbi/constant.SBI_CONSOLE_GETCHAR.html b/ch2/os/sbi/constant.SBI_CONSOLE_GETCHAR.html
new file mode 100644
index 00000000..12640c16
--- /dev/null
+++ b/ch2/os/sbi/constant.SBI_CONSOLE_GETCHAR.html
@@ -0,0 +1,6 @@
+SBI_CONSOLE_GETCHAR in os::sbi - Rust
+
+
\ No newline at end of file
diff --git a/ch2/os/sbi/constant.SBI_CONSOLE_PUTCHAR.html b/ch2/os/sbi/constant.SBI_CONSOLE_PUTCHAR.html
new file mode 100644
index 00000000..11240f3f
--- /dev/null
+++ b/ch2/os/sbi/constant.SBI_CONSOLE_PUTCHAR.html
@@ -0,0 +1,6 @@
+SBI_CONSOLE_PUTCHAR in os::sbi - Rust
+
+
\ No newline at end of file
diff --git a/ch2/os/sbi/constant.SBI_REMOTE_FENCE_I.html b/ch2/os/sbi/constant.SBI_REMOTE_FENCE_I.html
new file mode 100644
index 00000000..35e0c19e
--- /dev/null
+++ b/ch2/os/sbi/constant.SBI_REMOTE_FENCE_I.html
@@ -0,0 +1,6 @@
+SBI_REMOTE_FENCE_I in os::sbi - Rust
+
+
\ No newline at end of file
diff --git a/ch2/os/sbi/constant.SBI_REMOTE_SFENCE_VMA.html b/ch2/os/sbi/constant.SBI_REMOTE_SFENCE_VMA.html
new file mode 100644
index 00000000..4bedd2b5
--- /dev/null
+++ b/ch2/os/sbi/constant.SBI_REMOTE_SFENCE_VMA.html
@@ -0,0 +1,6 @@
+SBI_REMOTE_SFENCE_VMA in os::sbi - Rust
+
+
\ No newline at end of file
diff --git a/ch2/os/sbi/constant.SBI_REMOTE_SFENCE_VMA_ASID.html b/ch2/os/sbi/constant.SBI_REMOTE_SFENCE_VMA_ASID.html
new file mode 100644
index 00000000..06c69ce2
--- /dev/null
+++ b/ch2/os/sbi/constant.SBI_REMOTE_SFENCE_VMA_ASID.html
@@ -0,0 +1,6 @@
+SBI_REMOTE_SFENCE_VMA_ASID in os::sbi - Rust
+
+
\ No newline at end of file
diff --git a/ch2/os/sbi/constant.SBI_SEND_IPI.html b/ch2/os/sbi/constant.SBI_SEND_IPI.html
new file mode 100644
index 00000000..a3da3df2
--- /dev/null
+++ b/ch2/os/sbi/constant.SBI_SEND_IPI.html
@@ -0,0 +1,6 @@
+SBI_SEND_IPI in os::sbi - Rust
+
+
\ No newline at end of file
diff --git a/ch2/os/sbi/constant.SBI_SET_TIMER.html b/ch2/os/sbi/constant.SBI_SET_TIMER.html
new file mode 100644
index 00000000..b8c22ab8
--- /dev/null
+++ b/ch2/os/sbi/constant.SBI_SET_TIMER.html
@@ -0,0 +1,6 @@
+SBI_SET_TIMER in os::sbi - Rust
+
+
\ No newline at end of file
diff --git a/ch2/os/sbi/constant.SBI_SHUTDOWN.html b/ch2/os/sbi/constant.SBI_SHUTDOWN.html
new file mode 100644
index 00000000..1019984f
--- /dev/null
+++ b/ch2/os/sbi/constant.SBI_SHUTDOWN.html
@@ -0,0 +1,6 @@
+SBI_SHUTDOWN in os::sbi - Rust
+
+
\ No newline at end of file
diff --git a/ch2/os/sbi/fn.console_getchar.html b/ch2/os/sbi/fn.console_getchar.html
new file mode 100644
index 00000000..77867c6e
--- /dev/null
+++ b/ch2/os/sbi/fn.console_getchar.html
@@ -0,0 +1,7 @@
+console_getchar in os::sbi - Rust
+
use sbi call to getchar from console (qemu uart handler)
+
+
\ No newline at end of file
diff --git a/ch2/os/sbi/fn.console_putchar.html b/ch2/os/sbi/fn.console_putchar.html
new file mode 100644
index 00000000..0cf1da13
--- /dev/null
+++ b/ch2/os/sbi/fn.console_putchar.html
@@ -0,0 +1,7 @@
+console_putchar in os::sbi - Rust
+
use sbi call to putchar in console (qemu uart handler)
+
+
\ No newline at end of file
diff --git a/ch2/os/sbi/fn.sbi_call.html b/ch2/os/sbi/fn.sbi_call.html
new file mode 100644
index 00000000..00731305
--- /dev/null
+++ b/ch2/os/sbi/fn.sbi_call.html
@@ -0,0 +1,6 @@
+sbi_call in os::sbi - Rust
+
+
\ No newline at end of file
diff --git a/ch2/os/sbi/fn.shutdown.html b/ch2/os/sbi/fn.shutdown.html
new file mode 100644
index 00000000..61b32df2
--- /dev/null
+++ b/ch2/os/sbi/fn.shutdown.html
@@ -0,0 +1,7 @@
+shutdown in os::sbi - Rust
+
+
\ No newline at end of file
diff --git a/ch2/os/sbi/index.html b/ch2/os/sbi/index.html
new file mode 100644
index 00000000..e9e82a59
--- /dev/null
+++ b/ch2/os/sbi/index.html
@@ -0,0 +1,11 @@
+os::sbi - Rust
+
+
\ No newline at end of file
diff --git a/ch2/os/sbi/sidebar-items.js b/ch2/os/sbi/sidebar-items.js
new file mode 100644
index 00000000..57e03764
--- /dev/null
+++ b/ch2/os/sbi/sidebar-items.js
@@ -0,0 +1 @@
+initSidebarItems({"constant":[["SBI_CLEAR_IPI",""],["SBI_CONSOLE_GETCHAR",""],["SBI_CONSOLE_PUTCHAR",""],["SBI_REMOTE_FENCE_I",""],["SBI_REMOTE_SFENCE_VMA",""],["SBI_REMOTE_SFENCE_VMA_ASID",""],["SBI_SEND_IPI",""],["SBI_SET_TIMER",""],["SBI_SHUTDOWN",""]],"fn":[["console_getchar","use sbi call to getchar from console (qemu uart handler)"],["console_putchar","use sbi call to putchar in console (qemu uart handler)"],["sbi_call",""],["shutdown","use sbi call to shutdown the kernel"]]});
\ No newline at end of file
diff --git a/ch2/os/sidebar-items.js b/ch2/os/sidebar-items.js
new file mode 100644
index 00000000..0179a50d
--- /dev/null
+++ b/ch2/os/sidebar-items.js
@@ -0,0 +1 @@
+initSidebarItems({"fn":[["clear_bss",""],["rust_main",""]],"macro":[["print",""],["println",""]],"mod":[["batch",""],["console",""],["lang_items",""],["sbi",""],["sync",""],["syscall",""],["trap",""]]});
\ No newline at end of file
diff --git a/ch2/os/sync/index.html b/ch2/os/sync/index.html
new file mode 100644
index 00000000..26fd3968
--- /dev/null
+++ b/ch2/os/sync/index.html
@@ -0,0 +1,8 @@
+os::sync - Rust
+
+
\ No newline at end of file
diff --git a/ch2/os/sync/sidebar-items.js b/ch2/os/sync/sidebar-items.js
new file mode 100644
index 00000000..440fc425
--- /dev/null
+++ b/ch2/os/sync/sidebar-items.js
@@ -0,0 +1 @@
+initSidebarItems({"mod":[["up",""]]});
\ No newline at end of file
diff --git a/ch2/os/sync/up/index.html b/ch2/os/sync/up/index.html
new file mode 100644
index 00000000..26f07349
--- /dev/null
+++ b/ch2/os/sync/up/index.html
@@ -0,0 +1,9 @@
+os::sync::up - Rust
+
Wrap a static data structure inside it so that we are
+able to access it without any unsafe.
+
+
\ No newline at end of file
diff --git a/ch2/os/sync/up/sidebar-items.js b/ch2/os/sync/up/sidebar-items.js
new file mode 100644
index 00000000..d34252dd
--- /dev/null
+++ b/ch2/os/sync/up/sidebar-items.js
@@ -0,0 +1 @@
+initSidebarItems({"struct":[["UPSafeCell","Wrap a static data structure inside it so that we are able to access it without any `unsafe`."]]});
\ No newline at end of file
diff --git a/ch2/os/sync/up/struct.UPSafeCell.html b/ch2/os/sync/up/struct.UPSafeCell.html
new file mode 100644
index 00000000..d29e93de
--- /dev/null
+++ b/ch2/os/sync/up/struct.UPSafeCell.html
@@ -0,0 +1,26 @@
+UPSafeCell in os::sync::up - Rust
+
+
\ No newline at end of file
diff --git a/ch2/os/syscall/constant.SYSCALL_EXIT.html b/ch2/os/syscall/constant.SYSCALL_EXIT.html
new file mode 100644
index 00000000..53cf68dc
--- /dev/null
+++ b/ch2/os/syscall/constant.SYSCALL_EXIT.html
@@ -0,0 +1,6 @@
+SYSCALL_EXIT in os::syscall - Rust
+
+
\ No newline at end of file
diff --git a/ch2/os/syscall/constant.SYSCALL_WRITE.html b/ch2/os/syscall/constant.SYSCALL_WRITE.html
new file mode 100644
index 00000000..a37aec89
--- /dev/null
+++ b/ch2/os/syscall/constant.SYSCALL_WRITE.html
@@ -0,0 +1,6 @@
+SYSCALL_WRITE in os::syscall - Rust
+
+
\ No newline at end of file
diff --git a/ch2/os/syscall/fn.syscall.html b/ch2/os/syscall/fn.syscall.html
new file mode 100644
index 00000000..d46b1bd3
--- /dev/null
+++ b/ch2/os/syscall/fn.syscall.html
@@ -0,0 +1,7 @@
+syscall in os::syscall - Rust
+
handle syscall exception with syscall_id and other arguments
+
+
\ No newline at end of file
diff --git a/ch2/os/syscall/fs/constant.FD_STDOUT.html b/ch2/os/syscall/fs/constant.FD_STDOUT.html
new file mode 100644
index 00000000..a2a9bff0
--- /dev/null
+++ b/ch2/os/syscall/fs/constant.FD_STDOUT.html
@@ -0,0 +1,6 @@
+FD_STDOUT in os::syscall::fs - Rust
+
+
\ No newline at end of file
diff --git a/ch2/os/syscall/fs/fn.sys_write.html b/ch2/os/syscall/fs/fn.sys_write.html
new file mode 100644
index 00000000..b1b2e869
--- /dev/null
+++ b/ch2/os/syscall/fs/fn.sys_write.html
@@ -0,0 +1,6 @@
+sys_write in os::syscall::fs - Rust
+
+
\ No newline at end of file
diff --git a/ch2/os/syscall/fs/index.html b/ch2/os/syscall/fs/index.html
new file mode 100644
index 00000000..31b9eef4
--- /dev/null
+++ b/ch2/os/syscall/fs/index.html
@@ -0,0 +1,8 @@
+os::syscall::fs - Rust
+
+
\ No newline at end of file
diff --git a/ch2/os/syscall/fs/sidebar-items.js b/ch2/os/syscall/fs/sidebar-items.js
new file mode 100644
index 00000000..002a1085
--- /dev/null
+++ b/ch2/os/syscall/fs/sidebar-items.js
@@ -0,0 +1 @@
+initSidebarItems({"constant":[["FD_STDOUT",""]],"fn":[["sys_write",""]]});
\ No newline at end of file
diff --git a/ch2/os/syscall/index.html b/ch2/os/syscall/index.html
new file mode 100644
index 00000000..b591c9ff
--- /dev/null
+++ b/ch2/os/syscall/index.html
@@ -0,0 +1,10 @@
+os::syscall - Rust
+
handle syscall exception with syscall_id and other arguments
+
+
\ No newline at end of file
diff --git a/ch2/os/syscall/process/fn.sys_exit.html b/ch2/os/syscall/process/fn.sys_exit.html
new file mode 100644
index 00000000..f82bd3d1
--- /dev/null
+++ b/ch2/os/syscall/process/fn.sys_exit.html
@@ -0,0 +1,7 @@
+sys_exit in os::syscall::process - Rust
+
+
\ No newline at end of file
diff --git a/ch2/os/syscall/process/index.html b/ch2/os/syscall/process/index.html
new file mode 100644
index 00000000..3377c3f2
--- /dev/null
+++ b/ch2/os/syscall/process/index.html
@@ -0,0 +1,8 @@
+os::syscall::process - Rust
+
+
\ No newline at end of file
diff --git a/ch2/os/syscall/process/sidebar-items.js b/ch2/os/syscall/process/sidebar-items.js
new file mode 100644
index 00000000..491ce143
--- /dev/null
+++ b/ch2/os/syscall/process/sidebar-items.js
@@ -0,0 +1 @@
+initSidebarItems({"fn":[["sys_exit","task exits and submit an exit code"]]});
\ No newline at end of file
diff --git a/ch2/os/syscall/sidebar-items.js b/ch2/os/syscall/sidebar-items.js
new file mode 100644
index 00000000..c18cac38
--- /dev/null
+++ b/ch2/os/syscall/sidebar-items.js
@@ -0,0 +1 @@
+initSidebarItems({"constant":[["SYSCALL_EXIT",""],["SYSCALL_WRITE",""]],"fn":[["syscall","handle syscall exception with `syscall_id` and other arguments"]],"mod":[["fs",""],["process",""]]});
\ No newline at end of file
diff --git a/ch2/os/trap/context/index.html b/ch2/os/trap/context/index.html
new file mode 100644
index 00000000..f681954f
--- /dev/null
+++ b/ch2/os/trap/context/index.html
@@ -0,0 +1,7 @@
+os::trap::context - Rust
+
+
\ No newline at end of file
diff --git a/ch2/os/trap/context/sidebar-items.js b/ch2/os/trap/context/sidebar-items.js
new file mode 100644
index 00000000..d7c5bfe2
--- /dev/null
+++ b/ch2/os/trap/context/sidebar-items.js
@@ -0,0 +1 @@
+initSidebarItems({"struct":[["TrapContext",""]]});
\ No newline at end of file
diff --git a/ch2/os/trap/context/struct.TrapContext.html b/ch2/os/trap/context/struct.TrapContext.html
new file mode 100644
index 00000000..ea75c16f
--- /dev/null
+++ b/ch2/os/trap/context/struct.TrapContext.html
@@ -0,0 +1,19 @@
+TrapContext in os::trap::context - Rust
+
+
\ No newline at end of file
diff --git a/ch2/os/trap/fn.init.html b/ch2/os/trap/fn.init.html
new file mode 100644
index 00000000..0d3a3272
--- /dev/null
+++ b/ch2/os/trap/fn.init.html
@@ -0,0 +1,7 @@
+init in os::trap - Rust
+
+
\ No newline at end of file
diff --git a/ch2/os/trap/fn.trap_handler.html b/ch2/os/trap/fn.trap_handler.html
new file mode 100644
index 00000000..fec4c685
--- /dev/null
+++ b/ch2/os/trap/fn.trap_handler.html
@@ -0,0 +1,8 @@
+trap_handler in os::trap - Rust
+
handle an interrupt, exception, or system call from user space
+
+
\ No newline at end of file
diff --git a/ch2/os/trap/index.html b/ch2/os/trap/index.html
new file mode 100644
index 00000000..3093d332
--- /dev/null
+++ b/ch2/os/trap/index.html
@@ -0,0 +1,11 @@
+os::trap - Rust
+
+
\ No newline at end of file
diff --git a/ch2/src/os/console.rs.html b/ch2/src/os/console.rs.html
new file mode 100644
index 00000000..18c55e28
--- /dev/null
+++ b/ch2/src/os/console.rs.html
@@ -0,0 +1,68 @@
+console.rs - source
+
+
\ No newline at end of file
diff --git a/ch2/src/os/lang_items.rs.html b/ch2/src/os/lang_items.rs.html
new file mode 100644
index 00000000..696d616e
--- /dev/null
+++ b/ch2/src/os/lang_items.rs.html
@@ -0,0 +1,40 @@
+lang_items.rs - source
+
+
\ No newline at end of file
diff --git a/ch2/src/os/main.rs.html b/ch2/src/os/main.rs.html
new file mode 100644
index 00000000..c1c7f54c
--- /dev/null
+++ b/ch2/src/os/main.rs.html
@@ -0,0 +1,80 @@
+main.rs - source
+
+
\ No newline at end of file
diff --git a/ch2/src/os/sbi.rs.html b/ch2/src/os/sbi.rs.html
new file mode 100644
index 00000000..d29b5e20
--- /dev/null
+++ b/ch2/src/os/sbi.rs.html
@@ -0,0 +1,94 @@
+sbi.rs - source
+
+
\ No newline at end of file
diff --git a/ch2/src/os/sync/mod.rs.html b/ch2/src/os/sync/mod.rs.html
new file mode 100644
index 00000000..625d8d9d
--- /dev/null
+++ b/ch2/src/os/sync/mod.rs.html
@@ -0,0 +1,12 @@
+mod.rs - source
+
1
+2
+3
+
modup;
+
+pubuseup::UPSafeCell;
+
+
+
\ No newline at end of file
diff --git a/ch2/src/os/sync/up.rs.html b/ch2/src/os/sync/up.rs.html
new file mode 100644
index 00000000..8e982968
--- /dev/null
+++ b/ch2/src/os/sync/up.rs.html
@@ -0,0 +1,64 @@
+up.rs - source
+
usecore::cell::{RefCell, RefMut};
+
+/// Wrap a static data structure inside it so that we are
+/// able to access it without any `unsafe`.
+///
+/// We should only use it in uniprocessor.
+///
+/// In order to get mutable reference of inner data, call
+/// `exclusive_access`.
+pubstructUPSafeCell<T> {
+ /// inner data
+ inner: RefCell<T>,
+}
+
+unsafeimpl<T>SyncforUPSafeCell<T> {}
+
+impl<T>UPSafeCell<T> {
+ /// User is responsible to guarantee that inner struct is only used in
+ /// uniprocessor.
+ pubunsafefnnew(value: T) -> Self {
+ Self {
+ inner: RefCell::new(value),
+ }
+ }
+ /// Panic if the data has been borrowed.
+ pubfnexclusive_access(&self) -> RefMut<'_, T> {
+ self.inner.borrow_mut()
+ }
+}
+
+
+
\ No newline at end of file
diff --git a/ch2/src/os/syscall/fs.rs.html b/ch2/src/os/syscall/fs.rs.html
new file mode 100644
index 00000000..f883c38f
--- /dev/null
+++ b/ch2/src/os/syscall/fs.rs.html
@@ -0,0 +1,36 @@
+fs.rs - source
+
+
\ No newline at end of file
diff --git a/ch2/src/os/syscall/mod.rs.html b/ch2/src/os/syscall/mod.rs.html
new file mode 100644
index 00000000..a37c83d0
--- /dev/null
+++ b/ch2/src/os/syscall/mod.rs.html
@@ -0,0 +1,40 @@
+mod.rs - source
+
+
\ No newline at end of file
diff --git a/ch2/src/os/syscall/process.rs.html b/ch2/src/os/syscall/process.rs.html
new file mode 100644
index 00000000..db1cb28b
--- /dev/null
+++ b/ch2/src/os/syscall/process.rs.html
@@ -0,0 +1,20 @@
+process.rs - source
+
1
+2
+3
+4
+5
+6
+7
+
usecrate::batch::run_next_app;
+
+/// task exits and submit an exit code
+pubfnsys_exit(exit_code: i32) -> ! {
+ println!("[kernel] Application exited with code {}", exit_code);
+ run_next_app()
+}
+
+
+
\ No newline at end of file
diff --git a/ch2/src/os/trap/context.rs.html b/ch2/src/os/trap/context.rs.html
new file mode 100644
index 00000000..5b89852e
--- /dev/null
+++ b/ch2/src/os/trap/context.rs.html
@@ -0,0 +1,56 @@
+context.rs - source
+
+
\ No newline at end of file
diff --git a/ch2/src/os/trap/mod.rs.html b/ch2/src/os/trap/mod.rs.html
new file mode 100644
index 00000000..1cf52939
--- /dev/null
+++ b/ch2/src/os/trap/mod.rs.html
@@ -0,0 +1,112 @@
+mod.rs - source
+
modcontext;
+
+usecrate::batch::run_next_app;
+usecrate::syscall::syscall;
+usecore::arch::global_asm;
+useriscv::register::{
+ mtvec::TrapMode,
+ scause::{self, Exception, Trap},
+ stval, stvec,
+};
+
+global_asm!(include_str!("trap.S"));
+
+/// initialize CSR `stvec` as the entry of `__alltraps`
+pubfninit() {
+ extern"C" {
+ fn__alltraps();
+ }
+ unsafe {
+ stvec::write(__alltrapsasusize, TrapMode::Direct);
+ }
+}
+
+#[no_mangle]
+/// handle an interrupt, exception, or system call from user space
+pubfntrap_handler(cx: &mutTrapContext) -> &mutTrapContext {
+ letscause=scause::read(); // get trap cause
+ letstval=stval::read(); // get extra value
+ matchscause.cause() {
+ Trap::Exception(Exception::UserEnvCall) => {
+ cx.sepc+=4;
+ cx.x[10] =syscall(cx.x[17], [cx.x[10], cx.x[11], cx.x[12]]) asusize;
+ }
+ Trap::Exception(Exception::StoreFault) |Trap::Exception(Exception::StorePageFault) => {
+ println!("[kernel] PageFault in application, kernel killed it.");
+ run_next_app();
+ }
+ Trap::Exception(Exception::IllegalInstruction) => {
+ println!("[kernel] IllegalInstruction in application, kernel killed it.");
+ run_next_app();
+ }
+ _ => {
+ panic!(
+ "Unsupported trap {:?}, stval = {:#x}!",
+ scause.cause(),
+ stval
+ );
+ }
+ }
+ cx
+}
+
+pubusecontext::TrapContext;
+
+
+
\ No newline at end of file
diff --git a/ch2/storage.js b/ch2/storage.js
new file mode 100644
index 00000000..c090e1f3
--- /dev/null
+++ b/ch2/storage.js
@@ -0,0 +1 @@
+var darkThemes=["dark","ayu"];window.currentTheme=document.getElementById("themeStyle");window.mainTheme=document.getElementById("mainThemeStyle");var settingsDataset=(function(){var settingsElement=document.getElementById("default-settings");if(settingsElement===null){return null}var dataset=settingsElement.dataset;if(dataset===undefined){return null}return dataset})();function getSettingValue(settingName){var current=getCurrentValue('rustdoc-'+settingName);if(current!==null){return current}if(settingsDataset!==null){var def=settingsDataset[settingName.replace(/-/g,'_')];if(def!==undefined){return def}}return null}var localStoredTheme=getSettingValue("theme");var savedHref=[];function hasClass(elem,className){return elem&&elem.classList&&elem.classList.contains(className)}function addClass(elem,className){if(!elem||!elem.classList){return}elem.classList.add(className)}function removeClass(elem,className){if(!elem||!elem.classList){return}elem.classList.remove(className)}function onEach(arr,func,reversed){if(arr&&arr.length>0&&func){var length=arr.length;var i;if(reversed){for(i=length-1;i>=0;--i){if(func(arr[i])){return true}}}else{for(i=0;i=0){updateLocalStorage("rustdoc-preferred-dark-theme",localStoredTheme)}updateSystemTheme()}else{switchTheme(window.currentTheme,window.mainTheme,getSettingValue("theme")||"light",false)}
\ No newline at end of file
diff --git a/ch2/toggle-minus.svg b/ch2/toggle-minus.svg
new file mode 100644
index 00000000..73154788
--- /dev/null
+++ b/ch2/toggle-minus.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/ch2/toggle-plus.svg b/ch2/toggle-plus.svg
new file mode 100644
index 00000000..08b17033
--- /dev/null
+++ b/ch2/toggle-plus.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/ch2/wheel.svg b/ch2/wheel.svg
new file mode 100644
index 00000000..01da3b24
--- /dev/null
+++ b/ch2/wheel.svg
@@ -0,0 +1 @@
+
\ No newline at end of file