Releases: denoland/deno_bindgen
Releases · denoland/deno_bindgen
0.8.1
What's Changed
- fix: cannot fetch darwin arm64 binary by @skanehira in #125
- refactor: use Deno.Command instead of Deno.run #278 by @crowlKats in #124
New Contributors
- @crowlKats made their first contribution in #124
Full Changelog: 0.8.0...0.8.1
0.8.0
What's Changed
- feat: support f32, f64 in parameters of function by @skanehira in #97
- feat: Support CARGO_TARGET_DIR by @sigmaSd in #111
- feat: add support for Vec and Box<[u8]> by @usrtax in #106
- fix: build fail in release 0.7.0 by @skanehira in #96
- fix: do not cache local builds by @littledivy in #99
- fix: windows local build by @littledivy in #100
- fix: typo in readme by @lino-levan in #105
- fix: breaking ffi changes by @load1n9 in #118
- fix: release url by @kt3k in #121
- perf: leverage
buffer
fast path by @littledivy in #98 - docs: add logo by @hashrock in #103
- docs: add -r to install instruction by @sigmaSd in #113
- test: add tests for bindings by @sigmaSd in #115
New Contributors
- @hashrock made their first contribution in #103
- @lino-levan made their first contribution in #105
- @usrtax made their first contribution in #106
- @sigmaSd made their first contribution in #113
- @load1n9 made their first contribution in #118
- @kt3k made their first contribution in #121
Full Changelog: 0.7.0...0.8.0
0.7.0
deno_bindgen 0.7.0
What's Changed
- feat: support cargo workspace, consistent sorting by @zifeo in #84
- fix: the URL passed with the --release option is not used by @skanehira in #85
- fix: custom release by @zifeo in #88
- fix metafile location for cargo workspaces by @Natoandro in #89
- feat: add support for deno 1.25.0
buffer
ffi type by @tsar-boomba in #87 - fix: deno_bindgen does not work properly on Windows. by @skanehira in #92
New Contributors
- @skanehira made their first contribution in #85
- @Natoandro made their first contribution in #89
- @tsar-boomba made their first contribution in #87
Full Changelog: 0.6.0...0.7.0
0.5.0
0.4.1
deno_bindgen 0.4.1
- Fixes versioning of deno_bindgen_macro in library crate
0.4.0
deno_bindgen
0.4.0
What's Changed
- support returning buffers via Deno.UnsafePointer by @littledivy in #36
- Sort functions at codegen by @littledivy in #38
Full Changelog: 0.3.2...0.4.0
Upgrade to 0.4
Install the new CLI:
deno install -n deno_bindgen -f -A --unstable https://deno.land/x/[email protected]/cli.ts
and update your Cargo.toml dependency:
[dependencies]
deno_bindgen = "0.4.0"
0.3.2
deno_bindgen
0.3.2
- Rename
buffer
topointer
in accordance to the changes made in Deno 1.17
0.3.1
deno_bindgen
0.3.1
Changes
- support mutable buffers -
&mut [u8]
#22 - improvements to README and source refactor #24
- use import.meta for loading lib relative to module #25
- delete previous bindings metadata #28
- Force reload cache on debug builds. Enforce lifetimes for `&'a mut
- Support lifetimes in enums and #[serde(borrow)] for wrappers
- Stable rustc
- Handle malformed bindings.json. #30
- Support serde's tag and content enum attributes. #32
Full Changelog: 0.2.0...0.3.1
Upgrade to 0.3
Install the new CLI:
deno install -n deno_bindgen -f -A --unstable https://deno.land/x/[email protected]/cli.ts
and update your Cargo.toml dependency:
[dependencies]
deno_bindgen = "0.3.1"
0.2.0
deno_bindgen
0.2.0
New features
--release
accepts URLs and pass them to plug by @littledivy in #10- preserve Rust docs in JS bindings by @littledivy in #13
- support
non_blocking
attribute for symbols by @littledivy in #14 - add support for
&str
by @littledivy in #15 - add support for
&[u8]
by @littledivy in #16 - Add support for
enum
s by @littledivy in #17 - add support for serde attributes by @littledivy in #18
- autoformat with dprint WASM by @littledivy in #19
Usage
use deno_bindgen::deno_bindgen;
#[deno_bindgen]
pub struct Input {
/// Doc comments are transformed into
/// jsdocs.
a: Vec<Vec<String>>,
}
#[deno_bindgen(non_blocking)]
pub fn say_hello(message: &str) {
println!("{}", message);
}
Generated bindings will look like this:
// bindings/binding.ts
// ... <init code here>
type Input = {
/**
* Doc comments are transformed into
* jsdocs.
**/
a: Array<Array<string>>;
};
export async function say_hello(message: string) {
// ... <glue code for symbol here>
}
These bindings contain nessecary code to open the shared library, define symbols and expose type definitions. They can be simply imported into Deno code:
import { say_hello } from "./bindings/bindings.ts";
await say_hello("Demn!")
Full Changelog: 0.1.1...0.2.0