Simplified glue code generation for Deno FFI libraries written in Rust.

Overview

deno_bindgen

This tool aims to simplify glue code generation for Deno FFI libraries written in Rust.

Quickstart

# install CLI
deno install -Afq -n deno_bindgen https://deno.land/x/deno_bindgen/cli.ts
# Cargo.toml
[dependencies]
deno_bindgen = "0.1"
// add.rs
use deno_bindgen::deno_bindgen;

#[deno_bindgen]
pub struct Input {
  a: i32,
  b: i32,
}

#[deno_bindgen]
fn add(input: Input) -> i32 {
  input.a + input.b
}
$ deno_bindgen
// add.ts
import { add } from "./bindings/bindings.ts";

add({ a: 1, b: 2 }); // 3

LICENSE

MIT

Comments
  • Empty bindings.json file breaks build

    Empty bindings.json file breaks build

    • [ ] When deno_bindgen errors out it creates a empty bindings.json which should be fixed
    • [ ] Marko should check before if the file is a valid json if not recreate it
    opened by lucsoft 9
  • support `&str` as a return type

    support `&str` as a return type

    &str is already accepted as a parameter type, but it would be nice 🌠 to be able to return a &str. (Thanks to Andreu and divy for help in the discord.)

    Here's an example of a &str param from the 0.2 release announcement:

    #[deno_bindgen]
    pub fn say_hello(message: &str)  {
        println!("{}", message);
    }
    

    If it's changed to return a &str instead of printing it...

    #[deno_bindgen]
    pub fn say_hello(message: &str) -> &str {
        format!("{}", message)
    }
    

    The result is:

    error: custom attribute panicked  
     --> src/lib.rs:5:1               
      |                               
    5 | #[deno_bindgen]               
      | ^^^^^^^^^^^^^^^               
      |                               
      = help: message: not implemented
    

    That's from the current version of deno_bindgen, 0.5.

    This would be a really nice feature to have and would allow easily passing text across the FFI boundary.

    enhancement 
    opened by mwcz 8
  • feat: Support build target for multiple platforms

    feat: Support build target for multiple platforms

    At present, the compiled library can only be used for a single platform. If you want to support cross platform, you need to build multiple sets of code. This adds a lot of tedious work.

    opened by idanran 7
  • The

    The ".dll" cache loaded by FFI cannot be cleared

    // Auto-generated with deno_bindgen
    import { CachePolicy, prepare } from "https://deno.land/x/[email protected]/plug.ts"
    const opts = {
      name: "teyda_core",
      url: (new URL("../target/release", import.meta.url)).toString(),
      policy: undefined,
    }
    const _lib = await prepare(opts, {
      core_run: { parameters: [], result: "void", nonblocking: false },
      mh: { parameters: ["pointer", "usize"], result: "void", nonblocking: false },
    })
    
    export function test() {
      let rawResult = _lib.symbols.core_run()
      const result = rawResult
      return result
    }
    
    bug 
    opened by idanran 4
  • why &[u8] use  TextEncoder ? can't pass binary ...

    why &[u8] use TextEncoder ? can't pass binary ...

    use deno_bindgen::deno_bindgen;
    use image::{load_from_memory, EncodableLayout};
    use webp::Encoder;
    
    #[deno_bindgen]
    pub struct Img {
        bin: Option<Vec<u8>>,
    }
    
    #[deno_bindgen]
    pub fn toWebp(img: &[u8], quality: u8) -> Img {
        if let Ok(img) = load_from_memory(img) {
            let encoder = Encoder::from_image(&img).unwrap();
            let encoded_webp = encoder.encode((quality as f32) / 100.0);
            return Img {
                bin: Some(encoded_webp.as_bytes().into()),
            };
        }
    
        Img { bin: None }
    }
    
    export function toWebp(a0: Uint8Array, a1: number) {
      const a0_buf = encode(a0)
    
    opened by usrtax 3
  • Doesn't work with Deno v1.25.0

    Doesn't work with Deno v1.25.0

    deno_bindgen doesn't work cause https://github.com/denoland/deno/pull/15518

    log
    $ deno test -A --unstable
    Check file:///Users/skanehira/dev/github.com/denoland/deno_bindgen/example/bindings_test.ts
    error: TS2345 [ERROR]: Argument of type 'Uint8Array' is not assignable to parameter of type 'ToNativeType<"usize" | "pointer">'.
      let rawResult = _lib.symbols.add2(a0_buf, a0_buf.byteLength)
                                        ~~~~~~
        at file:///Users/skanehira/dev/github.com/denoland/deno_bindgen/example/bindings/bindings.ts:173:37
    
    TS2345 [ERROR]: Argument of type 'Uint8Array' is not assignable to parameter of type 'ToNativeType<"usize" | "pointer">'.
      let rawResult = _lib.symbols.test_buf(a0_buf, a0_buf.byteLength)
                                            ~~~~~~
        at file:///Users/skanehira/dev/github.com/denoland/deno_bindgen/example/bindings/bindings.ts:184:41
    
    TS2345 [ERROR]: Argument of type 'Uint8Array' is not assignable to parameter of type 'ToNativeType<"usize" | "pointer">'.
      let rawResult = _lib.symbols.test_buffer_return(a0_buf, a0_buf.byteLength)
                                                      ~~~~~~
        at file:///Users/skanehira/dev/github.com/denoland/deno_bindgen/example/bindings/bindings.ts:190:51
    
    TS2345 [ERROR]: Argument of type 'Uint8Array' is not assignable to parameter of type 'ToNativeType<"usize" | "pointer">'.
        a0_buf,
        ~~~~~~
        at file:///Users/skanehira/dev/github.com/denoland/deno_bindgen/example/bindings/bindings.ts:197:5
    
    TS2345 [ERROR]: Argument of type 'Uint8Array' is not assignable to parameter of type 'ToNativeType<"usize" | "pointer">'.
      let rawResult = _lib.symbols.test_lifetime(a0_buf, a0_buf.byteLength)
                                                 ~~~~~~
        at file:///Users/skanehira/dev/github.com/denoland/deno_bindgen/example/bindings/bindings.ts:210:46
    
    TS2345 [ERROR]: Argument of type 'Uint8Array' is not assignable to parameter of type 'ToNativeType<"usize" | "isize" | "pointer">'.
      let rawResult = _lib.symbols.test_mixed(a0, a1_buf, a1_buf.byteLength)
                                                  ~~~~~~
        at file:///Users/skanehira/dev/github.com/denoland/deno_bindgen/example/bindings/bindings.ts:226:47
    
    TS2345 [ERROR]: Argument of type 'Uint8Array' is not assignable to parameter of type 'ToNativeType<"i32" | "usize" | "pointer">'.
        a1_buf,
        ~~~~~~
        at file:///Users/skanehira/dev/github.com/denoland/deno_bindgen/example/bindings/bindings.ts:234:5
    
    TS2345 [ERROR]: Argument of type 'Uint8Array' is not assignable to parameter of type 'ToNativeType<"usize" | "pointer">'.
      let rawResult = _lib.symbols.test_mut_buf(a0_buf, a0_buf.byteLength)
                                                ~~~~~~
        at file:///Users/skanehira/dev/github.com/denoland/deno_bindgen/example/bindings/bindings.ts:243:45
    
    TS2345 [ERROR]: Argument of type 'Uint8Array' is not assignable to parameter of type 'ToNativeType<"usize" | "pointer">'.
      let rawResult = _lib.symbols.test_serde(a0_buf, a0_buf.byteLength)
                                              ~~~~~~
        at file:///Users/skanehira/dev/github.com/denoland/deno_bindgen/example/bindings/bindings.ts:264:43
    
    TS2345 [ERROR]: Argument of type 'Uint8Array' is not assignable to parameter of type 'ToNativeType<"usize" | "pointer">'.
      let rawResult = _lib.symbols.test_str(a0_buf, a0_buf.byteLength)
                                            ~~~~~~
        at file:///Users/skanehira/dev/github.com/denoland/deno_bindgen/example/bindings/bindings.ts:270:41
    
    TS2345 [ERROR]: Argument of type 'Uint8Array' is not assignable to parameter of type 'ToNativeType<"usize" | "pointer">'.
      let rawResult = _lib.symbols.test_tag_and_content(a0_buf, a0_buf.byteLength)
                                                        ~~~~~~
        at file:///Users/skanehira/dev/github.com/denoland/deno_bindgen/example/bindings/bindings.ts:281:53
    
    Found 11 errors.
    
    opened by skanehira 3
  • Encode as cstring instead of ptr + len

    Encode as cstring instead of ptr + len

    Currently encode encodes as u8 array and then gives the ptr and array len.

    I suggest to use cstrings instead so encoding as an u8 array that ends with a null byte.

    The why is the current use method requires Deno.UnsafePointer.of(), which requires unbounded --allow-ffi (similar issue https://github.com/denoland/deno/issues/15511)

    With the second method, there is no issue, and I can use --allow-ffi=lib

    opened by sigmaSd 2
  • deno_bindgen =

    deno_bindgen = "0.6.0": message: Type definition not found for `f32` identifier

    image

    error: custom attribute panicked --> src/lib.rs:5:1 | 5 | #[deno_bindgen] | ^^^^^^^^^^^^^^^ | = help: message: Type definition not found for f32 identifier

    opened by usrtax 2
  • fix: deno_bindgen does not work properly on Windows.

    fix: deno_bindgen does not work properly on Windows.

    fix https://github.com/denoland/deno_bindgen/issues/91

    When deno_bindgen run on Windows, the fetchPrefix should be ..\target\debug. But \ escapes the next characters, so the final fetchPrefix will be \..argetdebug.

    opened by skanehira 2
  • Accessing structs from C to Deno

    Accessing structs from C to Deno

    Hello, I know this is a rust based codegen but I hope it's ok to ask this. What could be the best way to access structs that contains strings in Deno from C? Is it advisable just to stringify the object in C so that I can do new Deno.UnsafePointerView(ptr).getCString() in Deno?

    Example

    typedef struct { char name; int age; } SampleObject;
    
    question 
    opened by walmartwarlord 2
  • Publishing a library

    Publishing a library

    First pass, authors will be able to pass the target triplet and the corresponding download URL (maybe using a JSON file). The CLI will generate code to download and cache the library.

    After that is implemented, authors should also be able to provide a git repository URL or source (zip/tar/...) or crates.io publish and deno_bindgen will generate relevant glue code to build the crate from source using the available Rust toolchain on the user's machine.

    enhancement help wanted 
    opened by littledivy 2
  • async codegen type decls missing & no promise resolving of number/void types

    async codegen type decls missing & no promise resolving of number/void types

    Using deno_bindgen==0.7.0 I'm facing some issues with non_blocking / async codegen.

    Given the following defs:

    #[deno_bindgen(non_blocking)]
    pub fn test_str_async() -> String {
        "test".to_string()
    }
    
    #[deno_bindgen(non_blocking)]
    pub fn test_u32_async() -> u32 {
        1
    }
    
    #[deno_bindgen(non_blocking)]
    pub fn test_void_async() {}
    

    Generates the following TS:

    ...
    
    const _lib = await prepare(opts, {
      test_str_async: { parameters: [], result: "pointer", nonblocking: true },
      test_u32_async: { parameters: [], result: "u32", nonblocking: true },
      test_void_async: { parameters: [], result: "void", nonblocking: true },
    })
    
    export function test_str_async() {
      let rawResult = _lib.symbols.test_str_async()
      const result = rawResult.then(readPointer)
      return result.then(decode)
    }
    export function test_u32_async() {
      let rawResult = _lib.symbols.test_u32_async()
      const result = rawResult
      return result
    }
    export function test_void_async() {
      let rawResult = _lib.symbols.test_void_async()
      const result = rawResult
      return result
    }
    

    Some issues:

    • Function type declarations are missing and inferred as any, for test_str_async I would expect a return type of Promise<string> or the function to be marked as async function ...
    • test_u32_async & test_void_async are not resolving the promise result like test_str_async - there's no indication in the function declaration it returns a promise
    opened by ross-weir 0
  • memery leak for deno_bindgen

    memery leak for deno_bindgen

    deno 1.26.0 (release, x86_64-unknown-linux-gnu) v8 10.7.193.3 typescript 4.8.3

    code is there https://github.com/usrtax/deno_bindgen_test

    use deno_bindgen::deno_bindgen;
    
    #[deno_bindgen]
    fn add3() -> &'static [u8] {
        &[
            1, 2, 3, 4, 5, 6, 7, 9, 0, 1, 2, 3, 4, 5, 6, 7, 9, 0, 1, 2, 3, 4, 5, 6, 7, 9, 0, 1, 2, 3,
        ]
    }
    

    test code https://github.com/usrtax/deno_bindgen_test/blob/main/lib/test.js

    #!/usr/bin/env -S node --es-module-specifier-resolution=node --trace-uncaught --expose-gc --unhandled-rejections=strict
    var main, n, sleep;
    
    import {
      add3
    } from '../bindings/bindings.ts';
    
    sleep = () => {
      return new Promise((resolve) => {
        return setTimeout(resolve, 10);
      });
    };
    
    n = 0;
    
    while (true) {
      main();
      if (n++ % 10000 === 0) {
        gc();
        await sleep();
        console.log(n, Deno.memoryUsage());
      }
    }
    
    

    run as begin image

    run 3mintues RES 1040M image

    run 10minutes RES 2177M

    run 1hour RES 14.9G image

    Deno.memoryUsage doesn't seem to be very accurate, pay more attention to the memory usage in top

    opened by usrtax 3
  • add support for Option<xx> (for example Option<Vec<u8>>)

    add support for Option (for example Option>)

    i created a pull request for Vec https://github.com/denoland/deno_bindgen/pull/106

    but i real need return type is Option<Vec<u8>>

    i don't kown how to impl this

    can anyone help me ?

    opened by usrtax 0
  • Revert non-working fix aiming to support docs.rs

    Revert non-working fix aiming to support docs.rs

    I originally provided a PR https://github.com/denoland/deno_bindgen/pull/82 (merged) for this issue: https://github.com/denoland/deno_bindgen/issues/72

    I have since discovered more about Rust compilation and procedural macros and realised my "fix" doesn't work as per this: https://github.com/rust-lang/docs.rs/issues/1823

    The two issues with attempting to use OUT_DIR:

    • OUT_DIR is not defined when running any type of cargo build except when a build.rs exists.
    • if OUT_DIR is defined (because a build.rs exists), the deno_bindgen_macro will output to ${OUT_DIR}/bindings.json as expected, but the cli.ts does not have OUT_DIR defined and will default to looking for bindings.json in the current working folder.

    I also see that my "fix" introduced another issue which was fixed here: https://github.com/denoland/deno_bindgen/pull/89

    After learning more and understanding more... I humbly submit a PR which:

    • rolls back the non-working fix: https://github.com/denoland/deno_bindgen/pull/82
    • rolls back the additional fix required for my non-working fix: https://github.com/denoland/deno_bindgen/pull/89
    • fixes a typo in the docs

    On my journey, I have also discovered that the issue of procedural macros having side-effects has been discussed elsewhere: https://github.com/rust-lang/cargo/issues/9084

    It would seem this issue is a general issue with using procedural macros for outputting auxiliary data and out of my league in terms of resolving.

    I am not sure what the solution is, but for now I will have to put up with the fact that when my project makes use of deno_bindgen I can't refer to the generated Rust docs on docs.rs...

    opened by vectronic 2
  • Add force flag to cli to bypass cargo cache

    Add force flag to cli to bypass cargo cache

    Found this to be an issue when switching between building release and debug. It wouldn't let you go from release to debug because the rust source hadn't changed, so now you can do a clean build through the cli.

    opened by tsar-boomba 0
Releases(0.7.0)
  • 0.7.0(Sep 13, 2022)

    deno_bindgen 0.7.0

    What's Changed

    • feat: support cargo workspace, consistent sorting by @zifeo in https://github.com/denoland/deno_bindgen/pull/84
    • fix: the URL passed with the --release option is not used by @skanehira in https://github.com/denoland/deno_bindgen/pull/85
    • fix: custom release by @zifeo in https://github.com/denoland/deno_bindgen/pull/88
    • fix metafile location for cargo workspaces by @Natoandro in https://github.com/denoland/deno_bindgen/pull/89
    • feat: add support for deno 1.25.0 buffer ffi type by @tsar-boomba in https://github.com/denoland/deno_bindgen/pull/87
    • fix: deno_bindgen does not work properly on Windows. by @skanehira in https://github.com/denoland/deno_bindgen/pull/92

    New Contributors

    • @skanehira made their first contribution in https://github.com/denoland/deno_bindgen/pull/85
    • @Natoandro made their first contribution in https://github.com/denoland/deno_bindgen/pull/89
    • @tsar-boomba made their first contribution in https://github.com/denoland/deno_bindgen/pull/87

    Full Changelog: https://github.com/denoland/deno_bindgen/compare/0.6.0...0.7.0

    Source code(tar.gz)
    Source code(zip)
  • 0.5.0(Feb 6, 2022)

    deno_bindgen 0.5.0

    • Add pointer and struct return types + async support https://github.com/denoland/deno_bindgen/pull/41
    • Support raw markers in struct fields https://github.com/denoland/deno_bindgen/pull/47
    • chore: update plug to 0.5.1 https://github.com/denoland/deno_bindgen/pull/50
    • Upgrade to Deno 1.18.2 https://github.com/denoland/deno_bindgen/pull/51

    Note: Repository was moved from littledivy/deno_bindgen to denoland/deno_bindgen

    Source code(tar.gz)
    Source code(zip)
  • 0.4.1(Dec 28, 2021)

  • 0.4.0(Dec 28, 2021)

    deno_bindgen 0.4.0

    What's Changed

    • support returning buffers via Deno.UnsafePointer by @littledivy in https://github.com/littledivy/deno_bindgen/pull/36
    • Sort functions at codegen by @littledivy in https://github.com/littledivy/deno_bindgen/pull/38

    Full Changelog: https://github.com/littledivy/deno_bindgen/compare/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"
    
    Source code(tar.gz)
    Source code(zip)
  • 0.3.2(Dec 17, 2021)

  • 0.3.1(Nov 15, 2021)

    deno_bindgen 0.3.1

    Changes

    • support mutable buffers - &mut [u8] https://github.com/littledivy/deno_bindgen/pull/22
    • improvements to README and source refactor https://github.com/littledivy/deno_bindgen/pull/24
    • use import.meta for loading lib relative to module https://github.com/littledivy/deno_bindgen/pull/25
    • delete previous bindings metadata https://github.com/littledivy/deno_bindgen/pull/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: https://github.com/littledivy/deno_bindgen/compare/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"
    
    Source code(tar.gz)
    Source code(zip)
  • 0.2.0(Oct 20, 2021)

    deno_bindgen 0.2.0

    New features

    • --release accepts URLs and pass them to plug by @littledivy in https://github.com/littledivy/deno_bindgen/pull/10
    • preserve Rust docs in JS bindings by @littledivy in https://github.com/littledivy/deno_bindgen/pull/13
    • support non_blocking attribute for symbols by @littledivy in https://github.com/littledivy/deno_bindgen/pull/14
    • add support for &str by @littledivy in https://github.com/littledivy/deno_bindgen/pull/15
    • add support for &[u8] by @littledivy in https://github.com/littledivy/deno_bindgen/pull/16
    • Add support for enums by @littledivy in https://github.com/littledivy/deno_bindgen/pull/17
    • add support for serde attributes by @littledivy in https://github.com/littledivy/deno_bindgen/pull/18
    • autoformat with dprint WASM by @littledivy in https://github.com/littledivy/deno_bindgen/pull/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: https://github.com/littledivy/deno_bindgen/compare/0.1.1...0.2.0

    Source code(tar.gz)
    Source code(zip)
  • 0.1.1(Oct 14, 2021)

  • 0.1.0(Oct 13, 2021)

    deno_bindgen 0.1.0

    This tool aims to simplify glue code generation for Deno FFI libraries written in Rust.

    Quickstart

    # install CLI
    deno install -Afq -n deno_bindgen https://deno.land/x/deno_bindgen/cli.ts
    
    # Cargo.toml
    [dependencies]
    deno_bindgen = "0.1"
    
    // add.rs
    use deno_bindgen::deno_bindgen;
    
    #[deno_bindgen]
    pub struct Input {
      a: i32,
      b: i32,
    }
    
    #[deno_bindgen]
    fn add(input: Input) -> i32 {
      input.a + input.b
    }
    
    $ deno_bindgen
    
    // add.ts
    import { add } from "./bindings/bindings.ts";
    
    add({ a: 1, b: 2 }); // 3
    
    Source code(tar.gz)
    Source code(zip)
Owner
Divy Srivastava
17. Contributing to @denoland. Rust, Go and Typescript. Core team @useverto @nestdotland
Divy Srivastava
An AI Toolbox for Simplified Access to AWS Bedrocks, Ollama from Rust

Hiramu Hiramu is a powerful and flexible Rust library that provides a high-level interface for interacting with various AI models and APIs, including

Raphael MANSUY 5 Apr 21, 2024
A simplified but faster version of Routerify

Routerify lite Routerify-lite is a simplified but faster version of Routerify. It only provides below functions: path matching error handling Why not

jinhua luo 7 Dec 30, 2022
Membrane is an opinionated crate that generates a Dart package from a Rust library. Extremely fast performance with strict typing and zero copy returns over the FFI boundary via bincode.

Membrane is an opinionated crate that generates a Dart package from a Rust library. Extremely fast performance with strict typing and zero copy returns over the FFI boundary via bincode.

Jerel Unruh 70 Dec 13, 2022
Easy to use Rust i18n library based on code generation

rosetta-i18n rosetta-i18n is an easy-to-use and opinionated Rust internationalization (i18n) library powered by code generation. rosetta_i18n::include

null 38 Dec 18, 2022
A cargo subcommand that extends cargo's capabilities when it comes to code generation.

cargo-px Cargo Power eXtensions Check out the announcement post to learn more about cargo-px and the problems it solves with respect to code generatio

Luca Palmieri 33 May 7, 2023
A code generator to reduce repetitive tasks and build high-quality Rust libraries. 🦀

LibMake A code generator to reduce repetitive tasks and build high-quality Rust libraries Welcome to libmake ?? Website • Documentation • Report Bug •

Sebastien Rousseau 27 Mar 12, 2023
Arkworks bindings to Circom's R1CS, for Groth16 Proof and Witness generation in Rust.

ark-circom Arkworks bindings to Circom's R1CS, for Groth16 Proof and Witness generation in Rust.

Georgios Konstantopoulos 138 Dec 25, 2022
A Rust library for random number generation.

A Rust library for random number generation.

null 1.3k Jan 6, 2023
Fegeya Gretea (aka green tea), new generation programming language.

Fegeya Gretea Gretea (aka green tea), new generation programming language. A taste of Gretea's syntax: import tea.green.fmt module hello { fn hel

Ferhat Geçdoğan 13 Sep 28, 2022
PartiQL libraries and tools in Rust.

This is a collection of crates to provide Rust support for the PartiQL query language.

null 54 Dec 26, 2022
mollusc is a collection of pure-Rust libraries for parsing, interpreting, and analyzing LLVM.

mollusc is a collection of pure-Rust libraries for parsing, interpreting, and analyzing LLVM.

William Woodruff 50 Dec 2, 2022
Rust libraries for working with GPT (GUID Partition Table) disk data

gpt-disk-rs no_std libraries related to GPT (GUID Partition Table) disk data. There are three Rust packages in this repository: uguid The uguid packag

Google 25 Dec 24, 2022
Mobile safari / webview remote debugging and e2e testing libraries

Canter (WIP) (WIP) Mobile safari / webview remote debugging and e2e testing libraries. Developed for safari/webview e2e testing on iPhone. Works only

Han Lee 9 Aug 16, 2022
A swc plugin that automatically converts React component libraries into "React Client Component"

A swc plugin that automatically converts React component libraries into "React Client Component". For example, you can automatically convert components from @mui into "React Client Component" without having to wrap a component that uses "use client".

xiaotian 3 Jul 12, 2023
A simple code boilerplate generator written in Rust.

?? Cgen What is Cgen? A modern, cross-platform, multi-language boilerplate generator aimed to make your code generation less hectic! If you wish to su

Rithul Kamesh 1 Dec 25, 2021
Migrate C code to Rust

C2Rust helps you migrate C99-compliant code to Rust. The translator (or transpiler) produces unsafe Rust code that closely mirrors the input C code. T

Immunant 3k Jan 8, 2023
Minimal, flexible framework for implementing solutions to Advent of Code in Rust

This is advent_of_code_traits, a minimal, flexible framework for implementing solutions to Advent of Code in Rust.

David 8 Apr 17, 2022
A code coverage tool for Rust projects

Tarpaulin Tarpaulin is a code coverage reporting tool for the Cargo build system, named for a waterproof cloth used to cover cargo on a ship. Currentl

null 1.8k Jan 2, 2023
Rust macro that uses GPT3 codex to generate code at compiletime

gpt3_macro Rust macro that uses GPT3 codex to generate code at compiletime. Just describe what you want the function to do and (optionally) define a f

Maximilian von Gaisberg 59 Dec 18, 2022