Skip to content

Commit

Permalink
extremely WIP commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Lucretiel committed Jan 13, 2025
1 parent f45732c commit cb02bd8
Show file tree
Hide file tree
Showing 9 changed files with 891 additions and 26 deletions.
211 changes: 209 additions & 2 deletions typeshare2/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 21 additions & 0 deletions typeshare2/README.md
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 ablessedset 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, well publish a typeshare-cli crate, equivalent to the one we have now, which supports the languages our team uses, for compatibility and efficiency.
5 changes: 5 additions & 0 deletions typeshare2/langs/README.md
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.
3 changes: 3 additions & 0 deletions typeshare2/typeshare-engine/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,8 @@ edition = "2021"

[dependencies]
anyhow = "1.0.95"
heck = "0.5.0"
ignore = "0.4.23"
rayon = "1.10.0"
syn = { version = "2.0.96", features = ["full"] }
typeshare-model = { path = "../typeshare-model" }
Loading

0 comments on commit cb02bd8

Please sign in to comment.