Skip to content

Commit 0a320ac

Browse files
ng 0.7.0
1 parent 4329b04 commit 0a320ac

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

99 files changed

+24777
-7250
lines changed

CHANGELOG.md

+10-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# hirofa-quickjs_sys - Changelog
22

3+
## 0.7.0
4+
5+
* updated quickjs-ng to 0.7.0
6+
* set bellard as default feature
7+
8+
## 0.6.1
9+
10+
* updated quickjs-ng to 0.6.1
11+
312
## 0.6.0
413

514
* updated quickjs-ng to 0.6.0
@@ -14,7 +23,7 @@
1423

1524
## 0.3.0
1625

17-
* quckjs-ng working
26+
* quickjs-ng working
1827

1928
## 0.1.0
2029

Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
edition = "2018"
33
name = "hirofa-quickjs-sys"
44
description = "QuickJS, QuickJS-NG Javascript Engine FFI bindings"
5-
version = "0.6.1"
5+
version = "0.7.0"
66
readme = "README.md"
77
repository = "https://github.com/HiRoFa/quickjs-sys"
88
license = "MIT"
@@ -13,7 +13,7 @@ keywords = ["quickjs"]
1313
build = "build.rs"
1414

1515
[features]
16-
default = ["quickjs-ng"]
16+
default = ["bellard"]
1717
bellard = []
1818
quickjs-ng = []
1919

quickjs-ng/bindings.rs

+29-40
Original file line numberDiff line numberDiff line change
@@ -233,8 +233,8 @@ pub const JS_DEF_PROP_UNDEFINED: u32 = 7;
233233
pub const JS_DEF_OBJECT: u32 = 8;
234234
pub const JS_DEF_ALIAS: u32 = 9;
235235
pub const QJS_VERSION_MAJOR: u32 = 0;
236-
pub const QJS_VERSION_MINOR: u32 = 6;
237-
pub const QJS_VERSION_PATCH: u32 = 1;
236+
pub const QJS_VERSION_MINOR: u32 = 7;
237+
pub const QJS_VERSION_PATCH: u32 = 0;
238238
pub const QJS_VERSION_SUFFIX: &[u8; 1] = b"\0";
239239
pub type __gnuc_va_list = __builtin_va_list;
240240
pub type __u_char = ::std::os::raw::c_uchar;
@@ -3022,11 +3022,7 @@ extern "C" {
30223022
extern "C" {
30233023
pub static mut signgam: ::std::os::raw::c_int;
30243024
}
3025-
//pub const FP_NAN: _bindgen_ty_1 = 0;
3026-
//pub const FP_INFINITE: _bindgen_ty_1 = 1;
3027-
//pub const FP_ZERO: _bindgen_ty_1 = 2;
3028-
//pub const FP_SUBNORMAL: _bindgen_ty_1 = 3;
3029-
//pub const FP_NORMAL: _bindgen_ty_1 = 4;
3025+
30303026
pub type _bindgen_ty_1 = ::std::os::raw::c_uint;
30313027
#[repr(C)]
30323028
#[derive(Debug, Copy, Clone)]
@@ -3067,36 +3063,6 @@ pub const JS_TAG_EXCEPTION: _bindgen_ty_2 = 6;
30673063
pub const JS_TAG_FLOAT64: _bindgen_ty_2 = 7;
30683064
pub type _bindgen_ty_2 = ::std::os::raw::c_int;
30693065
#[repr(C)]
3070-
#[derive(Debug, Copy, Clone)]
3071-
pub struct JSRefCountHeader {
3072-
pub ref_count: ::std::os::raw::c_int,
3073-
}
3074-
#[test]
3075-
fn bindgen_test_layout_JSRefCountHeader() {
3076-
const UNINIT: ::std::mem::MaybeUninit<JSRefCountHeader> = ::std::mem::MaybeUninit::uninit();
3077-
let ptr = UNINIT.as_ptr();
3078-
assert_eq!(
3079-
::std::mem::size_of::<JSRefCountHeader>(),
3080-
4usize,
3081-
concat!("Size of: ", stringify!(JSRefCountHeader))
3082-
);
3083-
assert_eq!(
3084-
::std::mem::align_of::<JSRefCountHeader>(),
3085-
4usize,
3086-
concat!("Alignment of ", stringify!(JSRefCountHeader))
3087-
);
3088-
assert_eq!(
3089-
unsafe { ::std::ptr::addr_of!((*ptr).ref_count) as usize - ptr as usize },
3090-
0usize,
3091-
concat!(
3092-
"Offset of field: ",
3093-
stringify!(JSRefCountHeader),
3094-
"::",
3095-
stringify!(ref_count)
3096-
)
3097-
);
3098-
}
3099-
#[repr(C)]
31003066
#[derive(Copy, Clone)]
31013067
pub union JSValueUnion {
31023068
pub int32: i32,
@@ -3310,6 +3276,9 @@ fn bindgen_test_layout_JSMallocFunctions() {
33103276
)
33113277
);
33123278
}
3279+
pub type JSRuntimeFinalizer = ::std::option::Option<
3280+
unsafe extern "C" fn(rt: *mut JSRuntime, arg: *mut ::std::os::raw::c_void),
3281+
>;
33133282
#[repr(C)]
33143283
#[derive(Debug, Copy, Clone)]
33153284
pub struct JSGCObjectHeader {
@@ -3354,6 +3323,13 @@ extern "C" {
33543323
extern "C" {
33553324
pub fn JS_SetRuntimeOpaque(rt: *mut JSRuntime, opaque: *mut ::std::os::raw::c_void);
33563325
}
3326+
extern "C" {
3327+
pub fn JS_AddRuntimeFinalizer(
3328+
rt: *mut JSRuntime,
3329+
finalizer: JSRuntimeFinalizer,
3330+
arg: *mut ::std::os::raw::c_void,
3331+
) -> ::std::os::raw::c_int;
3332+
}
33573333
pub type JS_MarkFunc =
33583334
::std::option::Option<unsafe extern "C" fn(rt: *mut JSRuntime, gp: *mut JSGCObjectHeader)>;
33593335
extern "C" {
@@ -3389,6 +3365,9 @@ extern "C" {
33893365
extern "C" {
33903366
pub fn JS_GetClassProto(ctx: *mut JSContext, class_id: JSClassID) -> JSValue;
33913367
}
3368+
extern "C" {
3369+
pub fn JS_GetFunctionProto(ctx: *mut JSContext) -> JSValue;
3370+
}
33923371
extern "C" {
33933372
pub fn JS_NewContextRaw(rt: *mut JSRuntime) -> *mut JSContext;
33943373
}
@@ -4308,10 +4287,16 @@ extern "C" {
43084287
pub fn JS_ThrowOutOfMemory(ctx: *mut JSContext) -> JSValue;
43094288
}
43104289
extern "C" {
4311-
pub fn __JS_FreeValue(ctx: *mut JSContext, v: JSValue);
4290+
pub fn JS_FreeValue(ctx: *mut JSContext, v: JSValue);
4291+
}
4292+
extern "C" {
4293+
pub fn JS_FreeValueRT(rt: *mut JSRuntime, v: JSValue);
4294+
}
4295+
extern "C" {
4296+
pub fn JS_DupValue(ctx: *mut JSContext, v: JSValue) -> JSValue;
43124297
}
43134298
extern "C" {
4314-
pub fn __JS_FreeValueRT(rt: *mut JSRuntime, v: JSValue);
4299+
pub fn JS_DupValueRT(rt: *mut JSRuntime, v: JSValue) -> JSValue;
43154300
}
43164301
extern "C" {
43174302
pub fn JS_ToBool(ctx: *mut JSContext, val: JSValue) -> ::std::os::raw::c_int;
@@ -4640,7 +4625,8 @@ extern "C" {
46404625
) -> ::std::os::raw::c_int;
46414626
}
46424627
extern "C" {
4643-
pub fn JS_SetOpaque(obj: JSValue, opaque: *mut ::std::os::raw::c_void);
4628+
pub fn JS_SetOpaque(obj: JSValue, opaque: *mut ::std::os::raw::c_void)
4629+
-> ::std::os::raw::c_int;
46444630
}
46454631
extern "C" {
46464632
pub fn JS_GetOpaque(obj: JSValue, class_id: JSClassID) -> *mut ::std::os::raw::c_void;
@@ -5687,6 +5673,9 @@ extern "C" {
56875673
extern "C" {
56885674
pub fn JS_GetVersion() -> *const ::std::os::raw::c_char;
56895675
}
5676+
extern "C" {
5677+
pub fn js_std_cmd(cmd: ::std::os::raw::c_int, ...) -> usize;
5678+
}
56905679
pub type __builtin_va_list = [__va_list_tag; 1usize];
56915680
#[repr(C)]
56925681
#[derive(Debug, Copy, Clone)]

0 commit comments

Comments
 (0)