Giter Club home page Giter Club logo

high-assurance-rust's Introduction


High Assurance Rust


High Assurance Rust

Pages Diagrams Price Text License: CC BY-NC-ND 4.0 Code License: MIT Assurance

Click here to read now: https://highassurance.rs/

What does this book aim to do?

  1. Provide an accessible but principled introduction to developing secure and robust systems. At the overlap of "state-of-the-art" and "near-term practical": mostly production-grade tools and techniques, but also some cutting-edge research projects. All open-source.

  2. Help experienced developers both learn a new language and delve deeper into fundamental Computer Science and Computer Architecture topics.

How can I help?

If you find this content valuable, consider increasing its visibility among developers by starring this GitHub repo. Much appreciated! :)

To cite this book directly in your own work, please use this BibTeX or similar:

@misc{high_assurance_rust,
    title={High Assurance Rust: Developing Secure and Robust Software},
    url={https://highassurance.rs},
    howpublished = "\url{https://highassurance.rs}",
    author={Ballo, Tiemoko and Ballo, Moumine and James, Alex},
    year={2022}
}

Interested in a physical print?

Please sign up here if you'd like to be notified when the book is finished and hard copies are available. The email you provide not be shared or used for any other purpose.

Have feedback or questions?

Your input matters. We'd love to hear from you, please send an email to:

[email protected]

Can I contribute?

Contributions are welcome and appreciated. Please see CONTRIBUTING.md.

Anything else I should know?

A great deal of effort went into making this book a reality. We hope you have as much fun reading as we did writing. Let's hack together!

high-assurance-rust's People

Contributors

aelnona avatar asher-gh avatar druthyn avatar humb1t avatar jamesreprise avatar logandark avatar qrilka avatar samestep avatar shak360 avatar silvancodes avatar tnballo avatar tshepang avatar vishallama avatar xandkeeper avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

high-assurance-rust's Issues

Example is missing a generic

Hello! I'm looking at https://highassurance.rs/chp7/traits.html#the-map-get-api.
The example with the get is never introducing the second generics K and V in the code example.

/// Returns a reference to the value corresponding to the key.
pub fn get<Q>(&self, key: &Q) -> Option<&V>
where
    K: Borrow<Q> + Ord,
    Q: Ord + ?Sized,
{
    // ...function body here...
}

I think a better example would be:

impl<K, V> BTreeMap<K, V> {
    pub fn get<Q>(&self, key: &Q) -> Option<&V>
    where
        K: Borrow<Q> + Ord,
        Q: Ord + ?Sized,
    {
        // ...function body here...
    }
    // ... rest of the methods
}

to show where the generic for BTreeMap are introduced. There is a mention of BTreeMap<K, V> but in my opinion I think it's easily missed and this would illustrate how the generics from the impl are used.

E: Unable to locate package rr

When running docker build . on the Dockerfile, the following errors occurs:

Screen Shot 2022-03-30 at 5 10 01 AM

Just wondering if anyone else has run or is running into this issue?

Chapter 1.5 namespaces reference link.

In src/chp1/_hands_on.md, line 109:

[^Namespaces]: [*Everything You Need to Know about Linux Containers, Part II: Working with Linux Containers (LXC)*](https://code.visualstudio.com/docs/remote/containers). Petros Koutoupis (2018).

should be

[^Namespaces]: [*Everything You Need to Know about Linux Containers, Part II: Working with Linux Containers (LXC)*](https://www.linuxjournal.com/content/everything-you-need-know-about-linux-containers-part-ii-working-linux-containers-lxc). Petros Koutoupis (2018).

The original link is about containers, but about setting them up using an extension for VScode and doesn't have the given title.

Add "Community Contributors" list to "About the Team" and a `CONTRIBUTING.md` to this repo

For the v0.3.1 update (#4), I'd like to add a "Community Contributors" list to the current "About the Team" page of the book. The idea is to alphabetically list the GitHub usernames of eagle-eyed readers who spot typos and issue PRs, e.g:

  • a_username
  • b_username
  • c_username

This could be a nice way to recognize community contributors for what might count as "proofreading" work in a traditional book publisher's process ๐Ÿ‘

Will add a CONTRIBUTING.md with more details in the next few days. Then reach out to those who provided typo fixes via email to ask consent for retroactive addition to the list.

Much like software bugs, typos are difficult to detect automatically and at scale! Appreciate the manual effort and feel this could lead to a more polished book in the long-term.

dead?

is this project dead?

v0.3.1

Coming ASAP:

  • Address accumulated feedback (huge thanks to everyone who reached out!)
  • Add PDF and EPUB downloads to the site (see #2)
  • Add source for all public content to this repo in order to reduce friction for typo fixing (see #3)

Error in stack frame diagram?

In https://highassurance.rs/chp4/assure_stack_1.html#the-stack, the stack diagram show that the stack frame for the square function still exist under all the recursive_count_down stack frames.
https://github.com/tnballo/high-assurance-rust/blob/main/src/chp4/stack_example.svg

But in my understanding, the stack frame of square should pop before the stack frames of recursive_count_down are added.

Indeed if I print the backtrace with:

        println!("Boom!");
        println!("{:#?}", backtrace::Backtrace::capture());
        return x;

I get:

Backtrace [
    { fn: "stack_test::recursive_count_down", file: "./src/main.rs", line: 8 },
    { fn: "stack_test::recursive_count_down", file: "./src/main.rs", line: 13 },
    { fn: "stack_test::recursive_count_down", file: "./src/main.rs", line: 13 },
    { fn: "stack_test::recursive_count_down", file: "./src/main.rs", line: 13 },
    { fn: "stack_test::recursive_count_down", file: "./src/main.rs", line: 13 },
    { fn: "stack_test::main", file: "./src/main.rs", line: 35 },
...

Did I miss something ?

Printing to pdf has formatting issues

image

The sample above shows what happens when trying to save this to a pdf. Not sure the cause here but I plan to do more digging as I want to read this on my ereader with reasonable ease.

Incorrect wording in chapter 1.1 "Languages by Level"

In the second sentence of this section, the book currently reads as

Rust can run in levels of the stack were scripting languages

... but the usage of "were" is incorrect. It should instead be

Rust can run in levels of the stack where scripting languages

As a side note, I would really appreciate if the book's source was present in this repository, even if you decide to keep it in some other branch for now - needing to open an issue or send an email is a bit irritating when one could instead just open a pull request to address an issue directly.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.