-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(adr): Add ADRs for Languages and Rust (#149)
* docs(docs): Bump mkdocs and dependent library versions to current latest * fix(docs): update lock file * docs(ADR): Add ADR's for Language/Spelling and Rust * docs(mdlint): Fix line length issue * fix(docs): Rust ADRs are draft, and fix spelling
- Loading branch information
Showing
14 changed files
with
234 additions
and
292 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 0 additions & 35 deletions
35
docs/src/architecture/09_architecture_decisions/0001-draft.md
This file was deleted.
Oops, something went wrong.
35 changes: 0 additions & 35 deletions
35
docs/src/architecture/09_architecture_decisions/0002-proposed.md
This file was deleted.
Oops, something went wrong.
35 changes: 0 additions & 35 deletions
35
docs/src/architecture/09_architecture_decisions/0003-accepted.md
This file was deleted.
Oops, something went wrong.
38 changes: 38 additions & 0 deletions
38
docs/src/architecture/09_architecture_decisions/0003-language.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
--- | ||
title: 0003 Language | ||
adr: | ||
author: Steven Johnson | ||
created: 09-Jan-2024 | ||
status: accepted | ||
tags: | ||
- Spelling | ||
--- | ||
|
||
## Context | ||
|
||
Any project contains a large amount of human readable text. | ||
The team is multi-national and a common primary language needs to be chosen for the project. | ||
|
||
## Assumptions | ||
|
||
That everyone on the team will have a reasonable grasp of the primary language of the project. | ||
That it will be reasonable to enforce the primary language on all team members contributions. | ||
|
||
## Decision | ||
|
||
After consultation with the existing team, | ||
and considerations of the audience for the project the primary language of the project will be: | ||
|
||
* US English | ||
|
||
## Risks | ||
|
||
* That people where English is not a primary language will have difficulty conforming to the requirement. | ||
|
||
## Consequences | ||
|
||
Having a uniform language for the project makes it easier for people to interact on a common basis. | ||
|
||
## More Information | ||
|
||
* [Why English is the Lingua Franca of Programming](https://ystudios.com/insights-passion/codelanguage) |
37 changes: 0 additions & 37 deletions
37
docs/src/architecture/09_architecture_decisions/0004-rejected.md
This file was deleted.
Oops, something went wrong.
53 changes: 53 additions & 0 deletions
53
docs/src/architecture/09_architecture_decisions/0004-spelling.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
--- | ||
title: 0004 Spelling | ||
adr: | ||
author: Steven Johnson | ||
created: 09-Jan-2024 | ||
status: accepted | ||
extends: | ||
- 0003-language | ||
tags: | ||
- Spelling | ||
--- | ||
|
||
## Context | ||
|
||
Any project contains a large amount of human readable text. | ||
The team is multi-national and it can not be assumed that everyone has a strong | ||
skills with the primary language of the project. | ||
|
||
## Assumptions | ||
|
||
That everyone on the team has a reasonable grasp of the primary language of the project. | ||
|
||
## Decision | ||
|
||
That the spelling of the Primary Language will be enforced in CI using: | ||
|
||
* [CSpell] | ||
* US English dictionaries | ||
* Technical words | ||
* Custom words on a pre-project basis | ||
|
||
Secondary Languages which are used in translating the UI, will also be checked with [CSpell]. | ||
|
||
## Risks | ||
|
||
* That a dictionary for a Secondary language does not exist for CSpell. | ||
|
||
It is possible to use custom dictionaries with [CSpell]. | ||
If a standard dictionary does not exist, a custom language dictionary can be added. | ||
This risk is mitigated. | ||
|
||
## Consequences | ||
|
||
Enforcing spelling in CI helps enforce consistency of all Human Readable text. | ||
By using automation we ensure this consistency, regardless of a contributors proficiency with the primary language | ||
|
||
`cspell` | ||
|
||
## More Information | ||
|
||
* [CSpell] | ||
|
||
[CSpell]: http://cspell.org/ |
87 changes: 87 additions & 0 deletions
87
docs/src/architecture/09_architecture_decisions/0005-rust.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
--- | ||
title: 0005 Rust | ||
adr: | ||
author: Steven Johnson | ||
created: 09-Jan-2024 | ||
status: draft | ||
tags: | ||
- Rust | ||
--- | ||
|
||
## Context | ||
|
||
Languages used in the project need to be chosen based on: | ||
|
||
* their strengths | ||
* suitability to the tasks they are used for | ||
* familiarity with the team. | ||
|
||
## Assumptions | ||
|
||
* That the language chosen will continue to be a mainstream language. | ||
* That it will be reasonably easy to find developers proficient in it. | ||
|
||
## Decision | ||
|
||
Backend and System level services can be coded in: | ||
|
||
* Rust | ||
|
||
Other languages can be also be used for these services as described by their own ADR. | ||
|
||
## Risks | ||
|
||
1. Learning Curve: Rust has a steep learning curve, especially for developers | ||
who are new to systems programming or low-level languages. | ||
The language enforces strict memory safety rules and introduces concepts | ||
like ownership, borrowing, and lifetimes, which can be challenging to grasp initially. | ||
This learning curve may require additional time and effort for developers to become proficient in Rust. | ||
2. Ecosystem Immaturity: While Rust has a growing ecosystem, | ||
it may not have the same level of maturity and breadth as more established languages. | ||
This can result in a smaller selection of libraries and tools compared to languages like Python or Java. | ||
However, the Rust community actively develops and maintains high-quality libraries, and many common use cases are well-supported. | ||
3. Development Speed: Rust's focus on safety and strict compile-time checks can sometimes slow down development speed, | ||
especially for rapid prototyping or small-scale projects. | ||
The compile times in Rust can be longer compared to other languages, which may impact the iterative development process. | ||
However, the benefits of safety and performance often outweigh this trade-off in larger-scale projects. | ||
|
||
Despite these risks, Rust's benefits in terms of memory safety, performance, and concurrency | ||
make it a compelling choice for backend systems programming. | ||
|
||
## Consequences | ||
|
||
1. Memory Safety: Rust's ownership system and borrow checker ensure memory safety at compile time, | ||
preventing common bugs like null pointer dereferences, buffer overflows, and data races. | ||
2. Performance: Rust enables low-level control over resources, developers can write efficient code with minimal runtime overhead. | ||
It offers zero-cost abstractions and fine-grained control over memory allocation. | ||
3. Concurrency: Rust's ownership model and built-in concurrency primitives, | ||
such as threads and channels, make it easy to write safe and concurrent code. | ||
The async/await syntax and the tokio library provide powerful asynchronous programming capabilities. | ||
4. Safety Guarantees: Rust's strict compile-time checks enforce safe programming practices, | ||
eliminating undefined behavior and making code more reliable. | ||
The language prevents common programming mistakes by catching them at compile time. | ||
5. Developer Experience: Rust has a growing ecosystem of libraries and tools, | ||
making it easier to build robust applications. | ||
The language promotes clear and explicit code, | ||
with helpful error messages and a strong type system that aids in code maintainability. | ||
6. Cross-platform Support: Rust is designed to be portable and can target a wide range of platforms, | ||
including desktop, mobile, and embedded systems. | ||
It supports various architectures and operating systems, making it versatile for different use cases. | ||
7. Interoperability: Rust can seamlessly interface with other languages, | ||
allowing developers to leverage existing code-bases or libraries. | ||
It provides C-compatible FFI (Foreign Function Interface) and supports integration with languages like C, C++, and Python. | ||
8. Community: Rust has a vibrant and supportive community that actively contributes to the language's development | ||
and provides valuable resources, documentation, and libraries. | ||
The community fosters a culture of knowledge sharing and collaboration. | ||
9. Tooling: Rust has a powerful package manager called Cargo, which simplifies dependency management and project build processes. | ||
It also offers excellent IDE support, code formatting, and extensive testing frameworks. | ||
10. Future-proofing: Rust is designed for long-term stability and compatibility. | ||
The language emphasizes backward compatibility and provides a strong commitment to avoiding breaking changes. | ||
This ensures that code written in Rust today will continue to work in the future. | ||
|
||
## More Information | ||
|
||
* [Rust](https://www.rust-lang.org/) | ||
* [Rust: A Language for the Next 40 Years](https://youtu.be/A3AdN7U24iU?si=NO__XP8DPZuRKBUB) - This video presentation by | ||
Carol Nichols highlights Rust's strengths and discusses its unique features, | ||
including memory safety, zero-cost abstractions, and concurrency. |
36 changes: 0 additions & 36 deletions
36
docs/src/architecture/09_architecture_decisions/0005-superseded.md
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.