Commit graph

191 commits

Author SHA1 Message Date
Christoph Herzog
5578af79a9 Update quickjs to 2019-10-27 2019-11-02 22:59:17 +01:00
Alexander Rodin
6afaa8ff7e fix: Typo in README 2019-10-15 12:31:54 +02:00
Alexander Rodin
4d6451b22d fix: Use c_char instead of architecture-specific i8 2019-10-15 12:31:28 +02:00
theduke
da08c05ba0
Merge pull request #49 from a-rodin/patch-4
fix: Use space instead of comma as a separator
2019-10-06 11:20:35 +02:00
Alexander Rodin
59fac31256
fix: Use space instead of comma as a separator 2019-10-04 18:37:22 +03:00
Christoph Herzog
65cf630c15 docs: Add Github Actions badge, remove old ones 2019-10-02 19:35:49 +02:00
theduke
5e5a50e05c
Merge pull request #46 from theduke/console
Console support
2019-10-02 19:30:37 +02:00
Christoph Herzog
4307fd83a8 chore: Remove outdated TODOs 2019-10-02 19:23:26 +02:00
Christoph Herzog
b028bd6b10 ci: Switch to Github Actions 2019-10-02 19:16:19 +02:00
Christoph Herzog
e039582a72 (feat) Console support
This commit implements console support.

A ConsoleBackend trait can be implemented and registered in the
ContextBuilder.

A implementation that forwards to the `log` crate is available with the
new `log` feature.
2019-10-02 17:28:42 +02:00
Christoph Herzog
0abd08b4e6 (feat) Support vararg callbacks with the Arguments wrapper type
Callbacks accepting a undetermined amount of arguments can now be
created by using a closure that takes a single callbacks::Arguments arg.
2019-10-02 14:04:35 +02:00
Alexander Rodin
142af5003a chore: Deny warnings and missing docs for tests using cfg_attr 2019-10-01 22:41:58 +02:00
theduke
31ad871241
docs: Document bigint feature in README 2019-09-26 18:33:05 +02:00
Christoph Herzog
10a53ad3af chore: Remove redundant #[cfg] attributes 2019-09-26 18:08:51 +02:00
Alexander Rodin
308686035b feat: Arbitrary Precision Integer Support
Implement support for the arbitrary precision integers feature of
quickjs.

In Rust, values are represented with the num-bignum::BigInt type.
2019-09-26 18:08:06 +02:00
Alexander Rodin
a2d8e1c3e1 Free runtime if context cannot be created 2019-09-21 15:02:46 +02:00
Christoph Herzog
f65c702428 Update quickjs to 2019-09-18 2019-09-21 14:52:01 +02:00
Christoph Herzog
7f31c267ff Update quickjs to 2019-09-01 release 2019-09-05 09:20:24 +02:00
Christoph Herzog
6866eed041 Prepare 0.2.3 2019-08-30 20:29:58 +02:00
Christoph Herzog
223a28fa27 (docs) Add note about future property iterator 2019-08-30 20:29:06 +02:00
Alexander Rodin
4a13c76415 Add Valgrind to CI 2019-08-30 20:29:06 +02:00
Alexander Rodin
5fd3bc7c72 Use RAII-style approach to free JS enum on errors 2019-08-30 20:29:06 +02:00
Alexander Rodin
be7fffaf14 Free atoms returned by q::JS_GetPropertyInternal 2019-08-30 20:29:06 +02:00
theduke
03e0db2427
Add Charlie Gordon attribution to README 2019-08-21 08:30:35 +02:00
Christoph Herzog
52a26ae639 Use JS_DefineProperty instead of SetProperty for new objects
This is the safe way to do it according to the QuickJS mailing list.
(might cause bugs if base object already has a similar property)
2019-08-20 13:45:43 +02:00
Christoph Herzog
4a87e54c66 release: v0.2.2 2019-08-13 11:19:40 +02:00
Christoph Herzog
273c60066a fix: Fix timetstamp conversion logic for JsValue::Date
A wrong multiplication factor was used to convert timestamps, which resulted
in treating nanoseconds as milliseconds instead.

Fixed by switching to millisecond helper functions in chrono.
2019-08-13 11:17:53 +02:00
Christoph Herzog
f05e738c44 v0.2.1 release 2019-08-13 01:40:29 +02:00
Christoph Herzog
cd42e0665d Add chrono integration 2019-08-13 01:34:49 +02:00
theduke
e4643a6aa1
Merge pull request #19 from a-rodin/stack-overflow-signed
Implement patched feature and fix stackoverflow in quickjs.
2019-08-13 00:14:39 +02:00
Christoph Herzog
a309c90d69 ci: Fix up circleci config for new patched features testing 2019-08-13 00:08:39 +02:00
Alexander Rodin
9afa90d30a ci: Test patched and default features on CI 2019-08-13 00:08:07 +02:00
Alexander Rodin
fd24e206f2 Add "patched" feature with "stack-overflow-signed.patch"
This commit adds a new "patched" feature to both the
bindings and the main crate.

This feature applies patches to the embedded version that fix up/extend quickjs.

All patches are in libquickjs-sys/embed/patches.
2019-08-13 00:06:25 +02:00
Christoph Herzog
e9475d5f4e Implement resolving of async values. 2019-08-12 19:39:20 +02:00
theduke
a43ab71d6a
Merge pull request #20 from theduke/deserialize-values
Upgrade quickjs + implement object deserializiation
2019-08-12 17:14:11 +02:00
Christoph Herzog
7098e1ab7e Formatting... 2019-08-12 17:08:45 +02:00
Christoph Herzog
2065a498f6 Implement object deserialization to HashMap 2019-08-12 16:42:00 +02:00
Christoph Herzog
5288235c9b Add JsValue::into_string helper method 2019-08-12 10:44:02 +02:00
Christoph Herzog
df142c859d Update lib to 0.3 in quick-js
* needed to adapt two function calls from u32 to usize
2019-08-12 08:54:17 +02:00
Christoph Herzog
ef0e6399ca lib: Bump libquickjs-sys to 0.3.0 2019-08-12 08:52:27 +02:00
Christoph Herzog
a89c6fd930 lib: Upgrade quickjs to release 2019-08-10 2019-08-12 08:52:22 +02:00
llgoer
5f870285c1 Update README.md 2019-08-06 07:33:08 +02:00
Alexander Rodin
a940b0ba47 Add note about runtimes and threads to the docs (#15)
Add note about runtimes and threads
2019-08-04 14:42:47 +02:00
Christoph Herzog
675139ee2e 0.2.0 release 2019-07-31 00:36:48 +02:00
Christoph Herzog
a4632c10d4 Fix pointer logic for callbacks. 2019-07-31 00:24:13 +02:00
Christoph Herzog
b1cb44adbc Allow more callback function signatures
* allow up to 5 arguments
* allow returning a Result<T, E>: Err(_) is converted to a JS exception
2019-07-30 20:46:31 +02:00
Christoph Herzog
00c78c874c docs: Add instructions for updating embedded quickjs 2019-07-30 18:25:34 +02:00
Christoph Herzog
8f4907eeb3 Document all items and deny missing docs. 2019-07-30 18:01:27 +02:00
Christoph Herzog
384b9f1189 Future-proof error enums with a __NonExhaustive variant. 2019-07-30 17:48:53 +02:00
Christoph Herzog
8155d68122 ci: Check formatting and clippy on CI run 2019-07-30 17:04:49 +02:00