fbb192e4b3
fix clippy lints
2023-02-05 18:22:56 +01:00
6eeb0f70b9
fix: cargo warnings
2022-10-03 00:37:26 +02:00
Christoph Herzog
4a4c2ff04f
docs: Update Windows info in crate docs
2021-06-08 21:24:47 +00:00
Christoph Herzog
9980a14770
Preparations for making bytecode compilation public
2021-06-08 21:24:47 +00:00
Christoph Herzog
8ed314de5f
Remove dead code, make JsCompiledFunction public
2021-06-08 21:24:47 +00:00
Christoph Herzog
ad8d27e463
Move DroppableValue to bindings
...
Since it is only used for bindings, it's better located there.
2021-06-08 21:24:47 +00:00
Christoph Herzog
f32bb7165a
Initial Bindings Refactor
...
This commit cleans up the bindings code and makes it a little more
structured and coherent.
It also removes sum direct usage of C code, or uses newly exported C
functions where appropriate.
The future goal of these changes is to export more functionality to
users and make the Owned* wrappers public.
* Manually export some additional helpers via static-helpers.c
* Rename Owned* types and move them to a subdirectory
* Add more convenience methods on Owned* types
* Add additional Owned wrappers for functions, bytecode, modules
* Move compile utils to bindings
* Move serializiation to subfile
TODO: The serialization code is also in need of a cleanup.
2021-06-08 21:24:47 +00:00
Andries Hiemstra
05f39f3db6
Implement bytecode compilation.
2021-06-08 21:24:47 +00:00
Christoph Herzog
7182a89f38
add Context::set_global
2021-02-04 21:52:25 +01:00
Christoph Herzog
ff3c3521be
Move tests to dedicated file
2021-02-04 21:13:34 +01:00
Christoph Herzog
2e37802653
Fix docs warnings
2021-02-04 20:49:01 +01:00
Ivan Pavluk
0c3eff9024
cargo fmt
2020-11-26 10:16:13 +01:00
Ivan Pavluk
f9eb75785c
Add JsValue::Undefined
2020-11-26 10:16:13 +01: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
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
5fd3bc7c72
Use RAII-style approach to free JS enum on errors
2019-08-30 20:29:06 +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
cd42e0665d
Add chrono integration
2019-08-13 01:34:49 +02:00
Christoph Herzog
e9475d5f4e
Implement resolving of async values.
2019-08-12 19:39:20 +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
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
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
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
90e11d7f48
Formatting...
2019-07-30 17:04:49 +02:00
Christoph Herzog
d3ca743ab1
Add Context::reset() that allows clearing all state.
2019-07-30 16:42:14 +02:00
Christoph Herzog
9e7ef36b58
Add ContextBuilder and allow customizing JS Runtime memory limit
2019-07-30 16:27:06 +02:00
Christoph Herzog
a638222cb8
Add a large string serialization test
2019-07-30 16:27:06 +02:00
Christoph Herzog
8a8d0b4528
Improve code docs.
2019-07-22 10:26:11 +02:00
Christoph Herzog
3851a43e85
Rename crate to quick-js
2019-07-22 09:49:30 +02:00
Christoph Herzog
51d0f28b20
Refactor crate names... damn name squatters!
2019-07-16 23:47:12 +02:00
Christoph Herzog
2b5d63bfb4
Fix exception handling (convert objects to string)
2019-07-16 16:36:56 +02:00
Christoph Herzog
9de3f94510
Fix warnings and add #![deny(warnings)] setting
2019-07-16 16:08:13 +02:00
Christoph Herzog
72f4907eb2
Add doc tests for Context methods
2019-07-16 16:06:23 +02:00
Christoph Herzog
00d9c9e9fb
Add some more tests
2019-07-16 14:40:45 +02:00
Christoph Herzog
8f4b124b00
Callbacks: handle panics and propagate any errors to JS as an exception
2019-07-16 14:26:04 +02:00
Christoph Herzog
aebe684edf
Cleanup and initial code documenation
...
* Remove some unused code
* Add method/struct comments
2019-07-16 10:33:15 +02:00
Christoph Herzog
49aee8be6a
Add eval_as helper.
2019-07-16 10:02:53 +02:00
Christoph Herzog
3ebc1bd4aa
Initial commit with working project.
2019-07-16 09:41:39 +02:00