diff --git a/Cargo.lock b/Cargo.lock index 22175bc283..5ab797bcde 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -91,6 +91,15 @@ dependencies = [ "pretty_assertions", ] +[[package]] +name = "arraystring" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d517c467117e1d8ca795bc8cc90857ff7f79790cca0e26f6e9462694ece0185" +dependencies = [ + "typenum", +] + [[package]] name = "arrayvec" version = "0.5.1" @@ -2358,6 +2367,7 @@ dependencies = [ name = "roc_editor" version = "0.1.0" dependencies = [ + "arraystring", "bumpalo", "env_logger 0.7.1", "futures", @@ -2389,7 +2399,6 @@ dependencies = [ "roc_unify", "roc_uniq", "target-lexicon", - "tokio", "wgpu", "wgpu_glyph", "winit", diff --git a/editor/Cargo.toml b/editor/Cargo.toml index 7685810325..3423d49853 100644 --- a/editor/Cargo.toml +++ b/editor/Cargo.toml @@ -28,7 +28,7 @@ im = "14" # im and im-rc should always have the same version! im-rc = "14" # im and im-rc should always have the same version! bumpalo = { version = "3.2", features = ["collections"] } inlinable_string = "0.1" -tokio = { version = "0.2", features = ["blocking", "fs", "sync", "rt-threaded", "process", "io-driver"] } +arraystring = "0.3.0" # NOTE: rtfeldman/inkwell is a fork of TheDan64/inkwell which does not change anything. # # The reason for this fork is that the way Inkwell is designed, you have to use diff --git a/editor/src/ast.rs b/editor/src/ast.rs index eab6d39eb6..2a82c668d5 100644 --- a/editor/src/ast.rs +++ b/editor/src/ast.rs @@ -1,3 +1,4 @@ +use arraystring::{typenum::U14, ArrayString}; use inlinable_string::string_ext::StringExt; use inlinable_string::InlinableString; use roc_types::subs::Variable; @@ -267,8 +268,10 @@ pub enum Expr2 { text_bytes: *const u8, var: Variable, }, - Str { - bytes: [u8; 15], + SmallStr(ArrayString), + BigStr { + bytes: *const u8, + len: u32, }, }