Skip to content

Commit

Permalink
moving some APIs from calcit
Browse files Browse the repository at this point in the history
  • Loading branch information
tiye committed Oct 2, 2021
1 parent d24ec4b commit a913785
Show file tree
Hide file tree
Showing 12 changed files with 2,185 additions and 292 deletions.
218 changes: 218 additions & 0 deletions Cargo.lock

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

6 changes: 6 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,9 @@ crate-type = ["dylib"] # Creates dynamic lib
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
serde = { version = "1.0.130", features = ["derive"] }
serde_json = "1.0.68"
chrono = "0.4.19"
regex = "1.5.4"
cirru_edn = "0.1.12"
cirru_parser = "0.1.8"
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,33 @@ calcit.std.fs/read-file! a
calcit.std.fs/write-file! a b
calcit.std.fs/path-exists? a
calcit.std.fs/read-dir? a
```

```cirru
calcit.std.process/execute! a
```

```cirru
calcit.std.json/stringify-json data true
calcit.std.json/parse-json "|{\"a\": [1, 2], \":b\": 3}"
```

```cirru
calcit.std.date/get-time!
calcit.std.date/parse-time "|2014-11-28 21:00:09 +09:00" "|%Y-%m-%d %H:%M:%S %z"
calcit.std.date/format-time 1417176009000 "|%Y-%m-%d %H:%M:%S %z"
```

```cirru
calcit.std.regex/re-matches |2 |\d
calcit.std.regex/re-find |a4 |\d
calcit.std.regex/re-find-index |a1 |\d
calcit.std.regex/re-find-all |123 |\d+
```

### License

MIT
3 changes: 3 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@

cargo build --release
mkdir -p dylibs/ && ls target/release/ && cp -v target/release/libcalcit_std.* dylibs/
Loading

0 comments on commit a913785

Please sign in to comment.