update model readme
This commit is contained in:
parent
2f36f82363
commit
6a109f2a5a
|
@ -7,19 +7,18 @@ as they do in other languages. We can combine all models from AWS into a single
|
|||
comptime constant even, however, we're keeping zig files 1:1 with json files
|
||||
for now.
|
||||
|
||||
The main executable, run with a "-s" first argument, will simply parse the
|
||||
Smithy json files passed by the rest of the arguments and save each one as
|
||||
its own file.json.zig. We will rely on shell commands to do the rest of the
|
||||
renaming (and moving if necessary).
|
||||
Optimization plan will be done by the placing of a json file in the output
|
||||
directory. The json file will contain a mapping between input files and generated
|
||||
outputs, as well as a top level directory hash. We can skip the output generation
|
||||
entirely if the top level hash matches, otherwise, individual hashes will be
|
||||
compared and output files will only regenerate if the input or output has changed.
|
||||
|
||||
To run this, we can use `codegen -s models/*.json`, which takes 20 seconds
|
||||
or so on my i5 chromebook and probably significantly faster on a real machine.
|
||||
No attempt has been made to optimize. Also, there are several bugs:
|
||||
|
||||
Todo
|
||||
----
|
||||
|
||||
* I do not think all the optional types have been sorted.
|
||||
* I think there is necessary metadata missing from EC2Query style services
|
||||
* The output will compile and is close to what `zig fmt` likes to see, but it
|
||||
has not yet been functionally tested
|
||||
* It handles all the types in existing AWS services, but it does not handle
|
||||
all known Smithy types (e.g. blob and document are missing)
|
||||
* It would be awesome to bring over the documentation from the model into
|
||||
|
@ -29,13 +28,7 @@ No attempt has been made to optimize. Also, there are several bugs:
|
|||
realistically I'm not sure if that will matter long term, and it's a fair
|
||||
amount of work as everything now can be done in a single pass without post
|
||||
processing.
|
||||
* This doesn't seem to build on 0.7.1 - you need master branch. I hope that
|
||||
0.8.0 will be out soon. If not, a few syntax changes need to be accommodated.
|
||||
|
||||
Some of these will likely be addressed as I integrate the code generated files into
|
||||
the SDK engine.
|
||||
|
||||
The models are Smithy json files, sourced from the AWS v2 go sdk
|
||||
for lack of a better place. I've just downloaded the main branch and copied
|
||||
the files from the tree in place.
|
||||
|
||||
for lack of a better place. Details are in build.zig of the parent project
|
||||
that is now responsible for downloading/caching the project.
|
||||
|
|
Loading…
Reference in New Issue
Block a user