Skip to content

Commit

Permalink
use roc_std from roc-lang/roc
Browse files Browse the repository at this point in the history
  • Loading branch information
lukewilliamboswell committed Sep 5, 2024
1 parent c2f83c3 commit af5f1c5
Show file tree
Hide file tree
Showing 12 changed files with 9 additions and 3,299 deletions.
117 changes: 1 addition & 116 deletions Cargo.lock

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

4 changes: 3 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
[workspace]
resolver = "2"
members = [
"crates/roc_std",
"crates/roc_app",
"crates/roc_fn",
"crates/roc_host",
Expand All @@ -14,3 +13,6 @@ members = [
lto = true
strip = "debuginfo"
codegen-units = 1

[workspace.dependencies]
roc_std = { git = "https://github.com/roc-lang/roc.git" }
2 changes: 1 addition & 1 deletion crates/roc_app/Cargo.toml

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

2 changes: 1 addition & 1 deletion crates/roc_fn/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ version = "1.0.0"
edition = "2021"

[dependencies]
roc_std = { path = "../roc_std", features = ["std"] }
roc_std.workspace = true
syn = { version = "1.0.42", features = ["full"] }
quote = "1.0.7"
proc-macro2 = "1.0"
Expand Down
2 changes: 1 addition & 1 deletion crates/roc_host/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ name = "roc_host"
path = "src/lib.rs"

[dependencies]
roc_std = { path = "../roc_std", features = ["std"] }
roc_std.workspace = true
roc_app = { path = "../roc_app" }
roc_fn = { path = "../roc_fn" }
libc = "0.2"
Expand Down
4 changes: 2 additions & 2 deletions crates/roc_host/src/roc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1003,7 +1003,7 @@ fn sqlite_columns(stmt: RocBox<()>) -> RocResult<RocList<RocStr>, ()> {
let col_name = unsafe { sqlite3_sys::sqlite3_column_name(local_stmt, i as c_int) };
let col_name = unsafe { CStr::from_ptr(col_name) };
// Both of these should be safe. Sqlite should always return a utf8 string with null terminator.
let col_name = RocStr::try_from(col_name).unwrap();
let col_name = RocStr::try_from(col_name.to_str().unwrap()).unwrap();
list.append(col_name);
}
RocResult::ok(list)
Expand Down Expand Up @@ -1093,7 +1093,7 @@ fn roc_err_from_sqlite_err<T>(code: SqliteError) -> RocResult<T, roc_app::Sqlite
let msg = unsafe { CStr::from_ptr(sqlite3_sys::sqlite3_errstr(code)) };
RocResult::err(roc_app::SqliteError {
code: code as i64,
message: RocStr::try_from(msg).unwrap_or(RocStr::empty()),
message: RocStr::try_from(msg.to_str().unwrap()).unwrap_or(RocStr::empty()),
})
}

Expand Down
28 changes: 0 additions & 28 deletions crates/roc_std/Cargo.toml

This file was deleted.

Loading

0 comments on commit af5f1c5

Please sign in to comment.