napi breaking changes
Updated December 4, 2026
On this page
Latest version 3.16.3, released November 23, 2026. Source repository
Packages on crates.io run on Rust. Rust end of life dates.
- From 2.0.0 to 3.0.0: 89 breaking changes in 2 versions.
- From 1.0.0 to 3.0.0: 110 breaking changes in 3 versions.
napi 3.0.0 breaking changes
- Removed
napi::bindgen_prelude::iterator::create_iterator
napi::bindgen_prelude::iterator::create_iterator was removed in napi 3.0.0 crates.io - Removed
napi::bindgen_prelude::Property::name
napi::bindgen_prelude::Property::name was removed in napi 3.0.0 crates.io - Removed
napi::Env::create_reference_with_refcount
napi::Env::create_reference_with_refcount was removed in napi 3.0.0 crates.io - Removed
napi::Env::create_symbol_from_js_string
napi::Env::create_symbol_from_js_string was removed in napi 3.0.0 crates.io - Removed
napi::Env::get_null
napi::Env::get_null was removed in napi 3.0.0 crates.io - Removed
napi::Env::get_undefined
napi::Env::get_undefined was removed in napi 3.0.0 crates.io - Removed
napi::EscapableHandleScope
napi::EscapableHandleScope was removed in napi 3.0.0 crates.io - Removed
napi::JsBigInt::coerce_to_number
napi::JsBigInt::coerce_to_number was removed in napi 3.0.0 crates.io - Removed
napi::JsBigInt::coerce_to_object
napi::JsBigInt::coerce_to_object was removed in napi 3.0.0 crates.io - Removed
napi::JsBigInt::coerce_to_string
napi::JsBigInt::coerce_to_string was removed in napi 3.0.0 crates.io - Removed
napi::JsBigInt::instanceof
napi::JsBigInt::instanceof was removed in napi 3.0.0 crates.io - Removed
napi::JsBigInt::into_unknown
napi::JsBigInt::into_unknown was removed in napi 3.0.0 crates.io - Removed
napi::JsBigInt::is_array
napi::JsBigInt::is_array was removed in napi 3.0.0 crates.io - Removed
napi::JsBigInt::is_buffer
napi::JsBigInt::is_buffer was removed in napi 3.0.0 crates.io - Removed
napi::JsBigInt::is_dataview
napi::JsBigInt::is_dataview was removed in napi 3.0.0 crates.io - Removed
napi::JsBigInt::is_date
napi::JsBigInt::is_date was removed in napi 3.0.0 crates.io - Removed
napi::JsBigInt::is_error
napi::JsBigInt::is_error was removed in napi 3.0.0 crates.io - Removed
napi::JsBigInt::is_typedarray
napi::JsBigInt::is_typedarray was removed in napi 3.0.0 crates.io - Removed
napi::JsSymbol
napi::JsSymbol was removed in napi 3.0.0 crates.io - Removed
napi::JsUnknown
napi::JsUnknown was removed in napi 3.0.0 crates.io - Removed
napi::module_init
napi::module_init was removed in napi 3.0.0 crates.io - Removed
napi::threadsafe_function::ThreadSafeCallContext::env
napi::threadsafe_function::ThreadSafeCallContext::env was removed in napi 3.0.0 crates.io - Removed
napi::threadsafe_function::ThreadSafeCallContext::value
napi::threadsafe_function::ThreadSafeCallContext::value was removed in napi 3.0.0 crates.io - Signature changed
napi::AsyncWorkPromise
Was struct AsyncWorkPromise; now struct AsyncWorkPromise<T>. crates.io - Signature changed
napi::AsyncWorkPromise::cancel
Was fn cancel(&self) -> Result<()>; now fn cancel(&mut self) -> Result<()>. crates.io - Signature changed
napi::AsyncWorkPromise::promise_object
Was fn promise_object(&self) -> JsObject; now fn promise_object<'env>(&self) -> PromiseRaw<'env, T>. crates.io - Signature changed
napi::bindgen_prelude::block_on
Was fn block_on<F: Future>(fut: F) -> F::Output; now fn block_on<F: Future>(_: F) -> F::Output. crates.io - Signature changed
napi::bindgen_prelude::create_custom_tokio_runtime
Was fn create_custom_tokio_runtime(rt: Runtime); now fn create_custom_tokio_runtime(_: Runtime). crates.io - Signature changed
napi::bindgen_prelude::execute_tokio_future
Was fn execute_tokio_future<Data: 'static + Send, Fut: 'static + Send + Future<Output = Result<Data>>, Resolver: 'static + FnOnce(sys::napi_env, Data) -> Result<sys::napi_value>>(env: sys::napi_env, fut: Fut, resolver: Resolver) ->... crates.io - Signature changed
napi::bindgen_prelude::Generator::catch
Was fn catch(&mut self, env: Env, value: Unknown) -> Result<Option<Self::Yield>, Unknown>; now fn catch<'env>(&'env mut self, env: Env, value: Unknown<'env>) -> Result<Option<Self::Yield>, Unknown<'env>>. crates.io - Signature changed
napi::bindgen_prelude::iterator::Generator::catch
Was fn catch(&mut self, env: Env, value: Unknown) -> Result<Option<Self::Yield>, Unknown>; now fn catch<'env>(&'env mut self, env: Env, value: Unknown<'env>) -> Result<Option<Self::Yield>, Unknown<'env>>. crates.io - Signature changed
napi::bindgen_prelude::Property::new
Was fn new(name: &str) -> Result<Self>; now fn new() -> Self. crates.io - Signature changed
napi::bindgen_prelude::Property::with_name
Was fn with_name(mut self, name: &str) -> Self; now fn with_name<T: ToNapiValue>(mut self, env: &Env, name: T) -> Result<Self>. crates.io - Signature changed
napi::bindgen_prelude::Property::with_value
Was fn with_value<T: NapiRaw>(mut self, value: &T) -> Self; now fn with_value<'env, T: JsValue<'env>>(mut self, value: &T) -> Self. crates.io - Signature changed
napi::bindgen_prelude::Task::finally
Was fn finally(&mut self, _env: Env) -> Result<()>; now fn finally(self, env: Env) -> Result<()>. crates.io - Signature changed
napi::bindgen_prelude::Task::reject
Was fn reject(&mut self, _env: Env, err: Error) -> Result<Self::JsValue>; now fn reject(&mut self, env: Env, err: Error) -> Result<Self::JsValue>. crates.io - Signature changed
napi::CallContext::get_all
Was fn get_all(&self) -> Vec<crate::JsUnknown>; now fn get_all(&self) -> Vec<crate::Unknown<'_>>. crates.io - Signature changed
napi::CallContext::try_get
Was fn try_get<ArgType: NapiValue + TypeName + FromNapiValue>(&self, index: usize) -> Result<Either<ArgType, JsUndefined>>; now fn try_get<ArgType: FromNapiValue + TypeName + FromNapiValue>(&self, index: usize) -> Result<Either<ArgType... crates.io - Signature changed
napi::De::new
Was fn new(value: &'env JsObject) -> Self; now fn new(value: &'env Object<'env>) -> Self. crates.io - Signature changed
napi::Env::add_env_cleanup_hook
Was fn add_env_cleanup_hook<T, F>(&mut self, cleanup_data: T, cleanup_fn: F) -> Result<CleanupEnvHook<T>> where T: 'static, F: 'static + FnOnce(T),; now fn add_env_cleanup_hook<T, F>(&self, cleanup_data: T, cleanup_fn: F) ->... crates.io - Signature changed
napi::Env::adjust_external_memory
Was fn adjust_external_memory(&mut self, size: i64) -> Result<i64>; now fn adjust_external_memory(&self, size: i64) -> Result<i64>. crates.io - Signature changed
napi::Env::create_array
Was fn create_array(&self, len: u32) -> Result<Array>; now fn create_array(&self, len: u32) -> Result<Array<'_>>. crates.io - Signature changed
napi::Env::create_arraybuffer_with_borrowed_data
Was unsafe fn create_arraybuffer_with_borrowed_data<Hint, Finalize>(&self, data: *mut u8, length: usize, hint: Hint, finalize_callback: Finalize) -> Result<JsArrayBufferValue> where Finalize: FnOnce(Hint, Env),; now unsafe fn... crates.io - Signature changed
napi::Env::create_buffer_with_borrowed_data
Was unsafe fn create_buffer_with_borrowed_data<Hint, Finalize>(&self, mut data: *mut u8, length: usize, hint: Hint, finalize_callback: Finalize) -> Result<JsBufferValue> where Finalize: FnOnce(Hint, Env),; now unsafe fn... crates.io - Signature changed
napi::Env::create_date
Was fn create_date(&self, time: f64) -> Result<JsDate>; now fn create_date(&self, time: f64) -> Result<JsDate<'_>>. crates.io - Signature changed
napi::Env::create_deferred
Was fn create_deferred<Data: ToNapiValue, Resolver: FnOnce(Env) -> Result<Data>>(&self) -> Result<(JsDeferred<Data, Resolver>, JsObject)>; now fn create_deferred<Data: ToNapiValue, Resolver: FnOnce(Env) -> Result<Data>>(&self) ->... crates.io - Signature changed
napi::Env::create_double
Was fn create_double(&self, double: f64) -> Result<JsNumber>; now fn create_double(&self, double: f64) -> Result<JsNumber<'_>>. crates.io - Signature changed
napi::Env::create_error
Was fn create_error(&self, e: Error) -> Result<JsObject>; now fn create_error(&self, e: Error) -> Result<Object<'_>>. crates.io - Signature changed
napi::Env::create_function
Was fn create_function(&self, name: &str, callback: Callback) -> Result<JsFunction>; now fn create_function<Args: JsValuesTupleIntoVec, Return>(&self, name: &str, callback: Callback) -> Result<Function<'_, Args, Return>>. crates.io - Signature changed
napi::Env::create_function_from_closure
Was fn create_function_from_closure<R, F>(&self, name: &str, callback: F) -> Result<JsFunction> where F: 'static + Fn(crate::CallContext<'_>) -> Result<R>, R: ToNapiValue,; now fn create_function_from_closure<Args: JsValuesTupleIntoVec... crates.io
And 38 more in this version. Sign up to see every change
napi 3.0.0-alpha.0 breaking changes
- Behavior changed
napi.bindgen_prelude.Buffer
Adds From String for Buffer in napi 3.0.0-alpha.0 github.com
napi 2.0.0 breaking changes
- Removed
napi::JsBigint
napi::JsBigint was removed in napi 2.0.0 crates.io - Removed
napi::Module
napi::Module was removed in napi 2.0.0 crates.io - Removed
napi::register_module!
napi::register_module! was removed in napi 2.0.0 crates.io - Removed
napi::ValueType::Bigint
napi::ValueType::Bigint was removed in napi 2.0.0 crates.io - Renamed
napi::JsFunction::new
Use napi::JsFunction::new_instance instead. crates.io - Signature changed
napi::AsyncWorkPromise
Was struct AsyncWorkPromise<'env>; now struct AsyncWorkPromise. crates.io - Signature changed
napi::AsyncWorkPromise::cancel
Was fn cancel(self) -> Result<()>; now fn cancel(&self) -> Result<()>. crates.io - Signature changed
napi::CallContext::get
Was fn get<ArgType: NapiValue>(&self, index: usize) -> Result<ArgType>; now fn get<ArgType: FromNapiValue>(&self, index: usize) -> Result<ArgType>. crates.io - Signature changed
napi::CallContext::try_get
Was fn try_get<ArgType: NapiValue>(&self, index: usize) -> Result<Either<ArgType, JsUndefined>>; now fn try_get<ArgType: NapiValue + TypeName + FromNapiValue>(&self, index: usize) -> Result<Either<ArgType, JsUndefined>>. crates.io - Signature changed
napi::Either
Was enum Either<A: NapiValue, B: NapiValue>; now enum Either<A: TypeName + FromNapiValue + ToNapiValue, B: TypeName + FromNapiValue + ToNapiValue>. crates.io
And 11 more in this version. Sign up to see every change
napi 1.0.0 breaking changes
- Removed
napi::Env::execute
napi::Env::execute was removed in napi 1.0.0 crates.io - Removed
napi::Env::throw
napi::Env::throw was removed in napi 1.0.0 crates.io - Removed
napi::NapiValue::from_raw_without_typecheck
napi::NapiValue::from_raw_without_typecheck was removed in napi 1.0.0 crates.io - Removed
napi::NapiValue::raw_value
napi::NapiValue::raw_value was removed in napi 1.0.0 crates.io - Removed
napi::threadsafe_function::ThreadsafeFunction::acquire
napi::threadsafe_function::ThreadsafeFunction::acquire was removed in napi 1.0.0 crates.io - Removed
napi::threadsafe_function::ThreadsafeFunction::release
napi::threadsafe_function::ThreadsafeFunction::release was removed in napi 1.0.0 crates.io - Removed
napi::threadsafe_function::ThreadsafeFunctionReleaseMode
napi::threadsafe_function::ThreadsafeFunctionReleaseMode was removed in napi 1.0.0 crates.io - Removed
napi::threadsafe_function::ToJs
napi::threadsafe_function::ToJs was removed in napi 1.0.0 crates.io - Signature changed
napi::CallContext
Was struct CallContext<'env, T: NapiValue = JsUnknown>; now struct CallContext<'env>. crates.io - Signature changed
napi::CallContext::env
Was env: &'env Env; now env: &'env mut Env. crates.io
And 26 more in this version. Sign up to see every change
Related packages
Check your code
These are the changes. To see which of them reach your code, scan a public repository, or have your coding agent call check_code with your manifest or lockfile over MCP. The API reads every change in every version. A fix pull request opens for the changes that reach a connected repository. Nothing merges or deploys.

Put your code on continuous maintenance.
Scan a public repository now, or give your agent one line.
See how out of date your code is.
Tell your agent what changed since it was trained.
claude mcp add --transport http since https://api.since.dev/mcpCodex, Cursor and any MCP client use https://api.since.dev/mcp.