File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed
codegen-core/src/main/kotlin/software/amazon/smithy/rust/codegen/core/smithy/generators Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ sealed class ModuleDocSection {
22
22
data class ServiceDocs (val documentationTraitValue : String? ) : ModuleDocSection()
23
23
object CrateOrganization : ModuleDocSection()
24
24
object Examples : ModuleDocSection()
25
+ object UnstableFeature : ModuleDocSection()
25
26
}
26
27
27
28
sealed class LibRsSection (name : String ) : Section(name) {
@@ -62,6 +63,27 @@ class LibRsGenerator(
62
63
containerDocs(escape(defaultServiceDocs ? : settings.moduleName))
63
64
}
64
65
66
+ // Unstable Feature
67
+ docSection(ModuleDocSection .UnstableFeature ).also { docs ->
68
+ if (docs.isNotEmpty()) {
69
+ containerDocs(" \n ## Unstable Features" )
70
+ val awsSdkUnstable = """
71
+ Some highly experimental features requires passing `aws_sdk_unstable` to RUSTFLAGS.
72
+ e.g.
73
+ ```bash
74
+ export RUSTFLAGS="--cfg aws_sdk_unstable"
75
+ cargo build --features serde-serialize
76
+ ```
77
+
78
+ If you enable unstable features without enabling `RUSTFLAGS="--cfg aws_sdk_unstable"`, compilation will fail with a message detailing the reason.
79
+ """ .trimIndent()
80
+ containerDocs(awsSdkUnstable)
81
+ docs.forEach { writeTo ->
82
+ writeTo(this )
83
+ }
84
+ }
85
+ }
86
+
65
87
// Crate Organization
66
88
docSection(ModuleDocSection .CrateOrganization ).also { docs ->
67
89
if (docs.isNotEmpty()) {
You can’t perform that action at this time.
0 commit comments