-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
891 additions
and
26 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,21 @@ | ||
# typeshare modularization project | ||
|
||
This document has been copied from the proposal in notion and serves as a quick reference. Notion should remain the source of truth, if possible. | ||
|
||
- Basic outline: | ||
- Typeshare-macro: provides the macro itself. The macro is basically a no-op so not much is needed here. Can perform checks that the tagged type *can* be typeshared. | ||
- Typeshare-model crate: Provides traits, data model. Dependency of language implementations. | ||
- typeshare-engine: parsing, executing. This crate is a depedency of any library wishing to use typeshare as a library | ||
- typeshare-driver: provides a macro similar to `tokio::main`, which creates an entry point using a list of languages. | ||
|
||
```rust | ||
generate_typeshare_cli!{Swift, Kotlin, Typescript} | ||
``` | ||
|
||
- language crates: | ||
- typeshare-typescript | ||
- typeshare-kotlin | ||
- typeshare-swift | ||
- etc | ||
- typeshare-cli will be a “blessed” set of languages supported by the PFT team. It will create a binary called typeshare that will hopefully be a drop-in replacement for the one we have now. | ||
- The intended architecture is that each language crate will have both a library mode and a CLI mode, with a binary supporting just that one language. Additionally, we’ll publish a typeshare-cli crate, equivalent to the one we have now, which supports the languages our team uses, for compatibility and efficiency. |
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,5 @@ | ||
# langs | ||
|
||
This directory contains the crates of the "blessed" typeshare implementations, supported by the 1Password OnE team. To start out, these should be typescript, swift, and kotlin. | ||
|
||
The crates in this directory should depend only on typeshare-model. |
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
Oops, something went wrong.