Skip to content

Commit

Permalink
feat(translator): implement serde feature
Browse files Browse the repository at this point in the history
Enables the serialization/deserialization of the rhai::AST and IndexMap.
  • Loading branch information
pythonbrad committed Mar 3, 2024
1 parent b196dd4 commit accd17f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion engine/translator/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@ default = ["rhai", "strsim"]
rhai = ["dep:rhai"]
rhai-wasm = ["rhai", "rhai/wasm-bindgen"]
strsim = ["dep:strsim"]
serde = ["indexmap/serde", "rhai/serde"]

[dependencies]
rhai = { version = "1.17.0", optional = true, features = ["only_i32", "f32_float", "no_custom_syntax"] }
indexmap = { version = "2.2.2", features = ["serde"] }
indexmap = { version = "2.2.2" }
strsim = { version = "0.10.0", optional = true }

[dev-dependencies]
Expand Down
1 change: 1 addition & 0 deletions engine/translator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ Enhance the language processing tasks within in input method engine.
- rhai: Enables the usage of the rhai scripting language.
- rhai-wasm: Like rhai, but wasm compatible.
- strsim: Enables the text similarity algorithm for better predictions.
- serde: Enables the serialization/deseroalization.

0 comments on commit accd17f

Please sign in to comment.