Skip to content

Commit 855f666

Browse files
committed
Add an RFC for lib.coding removal.
1 parent ea8b1d2 commit 855f666

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

text/0063-remove-lib-coding.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
- Start Date: 2024-04-08
2+
- RFC PR: [amaranth-lang/rfcs#63](https://github.com/amaranth-lang/rfcs/pull/63)
3+
- Amaranth Issue: [amaranth-lang/amaranth#1292](https://github.com/amaranth-lang/amaranth/issues/1292)
4+
5+
# Remove `amaranth.lib.coding`
6+
7+
## Summary
8+
[summary]: #summary
9+
10+
Remove `amaranth.lib.coding` and all classes in it.
11+
12+
## Motivation
13+
[motivation]: #motivation
14+
15+
This module has been essentially inherited from Migen and doesn't meet the bar for inclusion in Amaranth standard library. Most of the functionality included is so simple that it's essentially easier to just inline an implementation. The rest of it would be better served by a function than a module.
16+
17+
## Guide-level explanation
18+
[guide-level-explanation]: #guide-level-explanation
19+
20+
The module `amaranth.lib.coding` and all classes in it are removed. To continue using it, copy the contents of the module into your own project.
21+
22+
## Reference-level explanation
23+
[reference-level-explanation]: #reference-level-explanation
24+
25+
All classes within `amaranth.lib.coding` are deprecated in Amaranth 0.5 and removed (along with the module) in Amaranth 0.6. The Gray encoder is moved to `lib.fifo` as a private implementation detail.
26+
27+
## Drawbacks
28+
[drawbacks]: #drawbacks
29+
30+
- Churn.
31+
32+
## Rationale and alternatives
33+
[rationale-and-alternatives]: #rationale-and-alternatives
34+
35+
- This module is out of place in the standard library.
36+
- It has not seen much use and is trivially implemented outside of it.
37+
- Downstream consumers tend to inline the logic anyway.
38+
39+
## Unresolved questions
40+
[unresolved-questions]: #unresolved-questions
41+
42+
None.
43+
44+
## Future possibilities
45+
[future-possibilities]: #future-possibilities
46+
47+
The functionality could be brought back at a future point with a more suitable lightweight interface (as functions instead of modules), when the core language is flexible enough to support that.

0 commit comments

Comments
 (0)