mirror of
https://github.com/tauri-apps/javascriptcore-rs.git
synced 2026-01-31 00:35:17 +01:00
Merge pull request #79 from dklassic/doc-fix
fix(doc): Properly replace dox feature with docrs
This commit is contained in:
6
.changes/dox-fix.md
Normal file
6
.changes/dox-fix.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
"javascriptcore-rs-sys": patch
|
||||
"javascriptcore-rs": patch
|
||||
---
|
||||
|
||||
Properly replace dox with docsrs to fix docs.rs building.
|
||||
@@ -8,7 +8,9 @@ repository = "https://github.com/tauri-apps/javascriptcore-rs"
|
||||
version = "1.1.1"
|
||||
|
||||
[package.metadata.docs.rs]
|
||||
features = [ "dox" ]
|
||||
all-features = true
|
||||
rustc-args = [ "--cfg", "docsrs" ]
|
||||
rustdoc-args = [ "--cfg", "docsrs" ]
|
||||
|
||||
[lib]
|
||||
name = "javascriptcore"
|
||||
@@ -24,6 +26,5 @@ glib = "^0.18.0"
|
||||
|
||||
[features]
|
||||
default = [ "v2_38" ]
|
||||
dox = [ "ffi/dox" ]
|
||||
v2_28 = [ "ffi/v2_28" ]
|
||||
v2_38 = [ "ffi/v2_38", "v2_28" ]
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// // Copyright 2013-2017, The Gtk-rs Project Developers.
|
||||
// // See the COPYRIGHT file at the top-level directory of this distribution.
|
||||
// // Licensed under the MIT license, see the LICENSE file or <https://opensource.org/licenses/MIT>
|
||||
#![cfg_attr(feature = "dox", feature(doc_cfg))]
|
||||
#![cfg_attr(docsrs, feature(doc_cfg))]
|
||||
|
||||
mod auto;
|
||||
pub use auto::{traits::*, *};
|
||||
|
||||
24
src/value.rs
24
src/value.rs
@@ -8,8 +8,8 @@ use std::ffi::c_void;
|
||||
use std::slice;
|
||||
|
||||
impl Value {
|
||||
#[cfg(any(feature = "v2_38", feature = "dox"))]
|
||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_38")))]
|
||||
#[cfg(any(feature = "v2_38", docsrs))]
|
||||
#[cfg_attr(docsrs, doc(cfg(feature = "v2_38")))]
|
||||
#[doc(alias = "jsc_value_new_array_buffer")]
|
||||
pub fn new_array_buffer(context: &impl IsA<Context>, data: glib::Bytes) -> Option<Value> {
|
||||
let len = data.len();
|
||||
@@ -33,20 +33,20 @@ impl Value {
|
||||
}
|
||||
|
||||
pub trait ValueExtManual: 'static {
|
||||
#[cfg(any(feature = "v2_38", feature = "dox"))]
|
||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_38")))]
|
||||
#[cfg(any(feature = "v2_38", docsrs))]
|
||||
#[cfg_attr(docsrs, doc(cfg(feature = "v2_38")))]
|
||||
#[doc(alias = "jsc_value_array_buffer_get_data")]
|
||||
fn array_buffer_get_data(&self) -> &[u8];
|
||||
|
||||
#[cfg(any(feature = "v2_38", feature = "dox"))]
|
||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_38")))]
|
||||
#[cfg(any(feature = "v2_38", docsrs))]
|
||||
#[cfg_attr(docsrs, doc(cfg(feature = "v2_38")))]
|
||||
#[doc(alias = "jsc_value_typed_array_get_data")]
|
||||
fn typed_array_get_data(&self) -> TypedArrayData;
|
||||
}
|
||||
|
||||
impl<O: IsA<Value>> ValueExtManual for O {
|
||||
#[cfg(any(feature = "v2_38", feature = "dox"))]
|
||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_38")))]
|
||||
#[cfg(any(feature = "v2_38", docsrs))]
|
||||
#[cfg_attr(docsrs, doc(cfg(feature = "v2_38")))]
|
||||
fn array_buffer_get_data(&self) -> &[u8] {
|
||||
unsafe {
|
||||
let mut len = 0;
|
||||
@@ -59,8 +59,8 @@ impl<O: IsA<Value>> ValueExtManual for O {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v2_38", feature = "dox"))]
|
||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_38")))]
|
||||
#[cfg(any(feature = "v2_38", docsrs))]
|
||||
#[cfg_attr(docsrs, doc(cfg(feature = "v2_38")))]
|
||||
fn typed_array_get_data(&self) -> TypedArrayData {
|
||||
use crate::TypedArrayType::*;
|
||||
unsafe {
|
||||
@@ -91,8 +91,8 @@ impl<O: IsA<Value>> ValueExtManual for O {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v2_38", feature = "dox"))]
|
||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_38")))]
|
||||
#[cfg(any(feature = "v2_38", docsrs))]
|
||||
#[cfg_attr(docsrs, doc(cfg(feature = "v2_38")))]
|
||||
#[derive(Debug, Clone, Copy)]
|
||||
#[non_exhaustive]
|
||||
pub enum TypedArrayData<'a> {
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
[package]
|
||||
authors = [ "The Gtk-rs Project Developers" ]
|
||||
authors = ["The Gtk-rs Project Developers"]
|
||||
build = "build.rs"
|
||||
description = "Sys functions for the Rust bindings of the javacriptcore library"
|
||||
edition = "2021"
|
||||
keywords = [ "javascript", "gtk-rs", "gnome" ]
|
||||
keywords = ["javascript", "gtk-rs", "gnome"]
|
||||
license = "MIT"
|
||||
name = "javascriptcore-rs-sys"
|
||||
repository = "https://github.com/tauri-apps/javascriptcore-rs"
|
||||
@@ -13,16 +13,16 @@ version = "1.1.0"
|
||||
name = "javascriptcoregtk-4.1"
|
||||
version = "2.24"
|
||||
|
||||
[package.metadata.system-deps.javascriptcoregtk_4_1.v2_28]
|
||||
version = "2.28"
|
||||
[package.metadata.system-deps.javascriptcoregtk_4_1.v2_28]
|
||||
version = "2.28"
|
||||
|
||||
[package.metadata.system-deps.javascriptcoregtk_4_1.v2_38]
|
||||
version = "2.38"
|
||||
[package.metadata.system-deps.javascriptcoregtk_4_1.v2_38]
|
||||
version = "2.38"
|
||||
|
||||
[package.metadata.docs.rs]
|
||||
features = [ "dox" ]
|
||||
rustc-args = [ "--cfg", "docsrs" ]
|
||||
rustdoc-args = [ "--cfg", "docsrs", "--generate-link-to-definition" ]
|
||||
rustc-args = ["--cfg", "docsrs"]
|
||||
rustdoc-args = ["--cfg", "docsrs", "--generate-link-to-definition"]
|
||||
all-features = true
|
||||
|
||||
[lib]
|
||||
name = "javascriptcore_rs_sys"
|
||||
@@ -30,13 +30,13 @@ name = "javascriptcore_rs_sys"
|
||||
[dependencies]
|
||||
libc = "0.2"
|
||||
|
||||
[dependencies.glib]
|
||||
package = "glib-sys"
|
||||
version = "^0.18"
|
||||
[dependencies.glib]
|
||||
package = "glib-sys"
|
||||
version = "^0.18"
|
||||
|
||||
[dependencies.gobject]
|
||||
package = "gobject-sys"
|
||||
version = "^0.18"
|
||||
[dependencies.gobject]
|
||||
package = "gobject-sys"
|
||||
version = "^0.18"
|
||||
|
||||
[build-dependencies]
|
||||
system-deps = "6"
|
||||
@@ -46,6 +46,5 @@ shell-words = "1.0.0"
|
||||
tempfile = "3"
|
||||
|
||||
[features]
|
||||
dox = [ ]
|
||||
v2_28 = [ ]
|
||||
v2_38 = [ "v2_28" ]
|
||||
v2_28 = []
|
||||
v2_38 = ["v2_28"]
|
||||
|
||||
Reference in New Issue
Block a user