Changelog
napi-derive

napi-derive

napi-derive@2.16.9

7/16/2024

What's Changed

New Contributors

Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi-derive@2.16.8...napi-derive@2.16.9 (opens in a new tab)

napi-derive@3.0.0-alpha.6

7/16/2024

What's Changed

New Contributors

Full Changelog: https://github.com/napi-rs/napi-rs/compare/@napi-rs/cli@3.0.0-alpha.59...napi-derive@3.0.0-alpha.6 (opens in a new tab)

napi-derive@2.16.8

7/1/2024

What changed

  • fix(napi-derive): missing declare keyword for function

Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi-derive@2.16.7...napi-derive@2.16.8 (opens in a new tab)

napi-derive@3.0.0-alpha.3

7/1/2024

What's Changed

Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi-derive@3.0.0-alpha.2...napi-derive@3.0.0-alpha.3 (opens in a new tab)

napi-derive@2.16.4

5/6/2024

What's Changed

Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi-derive@2.16.3...napi-derive@2.16.4 (opens in a new tab)

napi-derive@2.16.3

4/18/2024

What Changed

Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@2.16.4...napi-derive@2.16.3 (opens in a new tab)

napi-derive@2.16.2

4/10/2024

What's Changed

Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi-derive@2.16.1...napi-derive@2.16.2 (opens in a new tab)

napi-derive@2.16.1

3/26/2024

What's Changed

New Contributors

Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi-derive@2.16.0...napi-derive@2.16.1 (opens in a new tab)

napi-derive@2.16.0

2/28/2024

What's Changed

New Contributors

Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@2.15.4...napi-derive@2.16.0 (opens in a new tab)

napi-derive@2.15.1

2/8/2024

What's Changed

Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@2.15.1...napi-derive@2.15.1 (opens in a new tab)

napi-derive@2.15.0

1/26/2024

What's Changed

Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi-derive@2.14.6...napi-derive@2.15.0 (opens in a new tab)

napi-derive@2.14.6

12/27/2023

What's Changed

Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi-derive@2.14.5...napi-derive@2.14.6 (opens in a new tab)

napi-derive@2.14.5

12/27/2023

What's Changed

Full Changelog: https://github.com/napi-rs/napi-rs/compare/@napi-rs/cli@3.0.0-alpha.24...napi-derive@2.14.5 (opens in a new tab)

napi-derive@2.14.4

12/13/2023

What's Changed

Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi-derive@2.14.3...napi-derive@2.14.4 (opens in a new tab)

napi-derive@2.14.3

12/11/2023

What's Changed

Full Changelog: https://github.com/napi-rs/napi-rs/compare/@napi-rs/cli@3.0.0-alpha.15...napi-derive@2.14.3 (opens in a new tab)

napi-derive@2.14.2

11/20/2023

What's Changed

Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi-derive@2.14.1...napi-derive@2.14.2 (opens in a new tab)

napi-derive@2.14.1

11/8/2023

What's Changed

Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi-sys@2.3.0...napi-derive@2.14.1 (opens in a new tab)

napi-derive@2.14.0

11/7/2023

What's Changed

napi-derive@2.12.5

4/26/2023

What's Changed

Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi-derive@2.12.4...napi-derive@2.12.5 (opens in a new tab)

napi-derive@2.12.4

4/25/2023

What's Changed

Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@2.12.5...napi-derive@2.12.4 (opens in a new tab)

napi-derive@2.12.3

4/11/2023

Core features

#[napi(string_enum)]
pub enum Status {
  Pristine,
  Loading,
  Ready,
}

⬇️⬇️⬇️⬇️⬇️

export const enum Status {
  Pristine = 'Pristine',
  Loading = 'Loading',
  Ready = 'Ready'
}

What's Changed

Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi-derive@2.12.2...napi-derive@2.12.3 (opens in a new tab)

napi-derive@2.12.2

3/22/2023

What's Changed

Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi-derive@2.12.1...napi-derive@2.12.2 (opens in a new tab)

napi-derive@2.12.1

3/21/2023

What's Changed

Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi-derive@2.12.0...napi-derive@2.12.1 (opens in a new tab)

napi-derive@2.12.0

3/21/2023

What's Changed

Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@2.11.4...napi-derive@2.12.0 (opens in a new tab)

napi-derive@2.11.2

3/14/2023

What's Changed

Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi-derive@2.11.1...napi-derive@2.11.2 (opens in a new tab)

napi-derive@2.11.1

2/18/2023

Changes

Full Changelog: https://github.com/napi-rs/napi-rs/compare/@napi-rs/cli@2.14.8...napi-derive@2.11.1 (opens in a new tab)

napi-derive@2.10.1

1/31/2023

What's Changed

Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi-derive@2.10.0...napi-derive@2.10.1 (opens in a new tab)

napi-derive@2.10.0

1/24/2023

Highlights

ThreadsafeFunction as params and object fields

#[napi]
pub fn accept_callback(callback: ThreadsafeFunction<u32>) {
  std::thread::spawn(move || {
    callback.call(200);
  });
}

⬇️⬇️⬇️⬇️⬇️

export function acceptCallback(callback: (err: Error | null, value: number) -> any)

Disable ToNapiValue for Object

With the object_to_js = false filed, the ThreadsafeFunction could be set as an Object field.

#[napi(object, object_to_js = false)]
pub struct Options {
  pub enable_jsx: bool,
  pub on_data: ThreadsafeFunction<Vec<u8>>,
}

What's Changed

Full Changelog: https://github.com/napi-rs/napi-rs/compare/@napi-rs/cli@2.14.4...napi-derive@2.10.0 (opens in a new tab)

napi-derive@2.9.5

1/14/2023

What's Changed

Full Changelog: https://github.com/napi-rs/napi-rs/compare/@napi-rs/cli@2.14.3...napi-derive@2.9.5 (opens in a new tab)

napi-derive@2.9.4

1/13/2023

What's Changed

Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@2.10.6...napi-derive@2.9.4 (opens in a new tab)

napi-derive@2.9.3

12/9/2022

What's Changed

Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi-derive@2.9.2...napi-derive@2.9.3 (opens in a new tab)

napi-derive@2.9.1

9/8/2022

What's Changed

New Contributors

Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@2.9.0...napi-derive@2.9.1 (opens in a new tab)

napi-derive@2.9.0

8/23/2022

What's Changed

New Contributors

Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi-derive@2.8.0...napi-derive@2.9.0 (opens in a new tab)

napi-derive@2.8.0

8/17/2022

What's Changed

Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi-derive@2.7.0...napi-derive@2.8.0 (opens in a new tab)

napi-derive@2.7.0

8/7/2022

What's Changed

napi-derive@2.6.0

7/6/2022

What's Changed

Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi-derive@2.5.0...napi-derive@2.6.0 (opens in a new tab)

napi-derive@2.5.0

6/10/2022

What's Changed

Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi-derive@2.4.1...napi-derive@2.5.0 (opens in a new tab)