-
Notifications
You must be signed in to change notification settings - Fork 285
Candidate Breaking Changes for 1.0
Dave Herman edited this page Jun 2, 2023
·
11 revisions
This is a list of candidate breaking changes for 1.0. We will not necessarily go through with all of them! We're building a master list here so we can prioritize and decide which changes are worth it and which ones aren't worth the disruption.
- Generalize
export_function()
andJsFunction::new()
to take an auto-destructuring trait (see #953)
-
Align<== rejected: better forward-looking approach is Serde arg parsingargument_opt()
signature withargument()
signature Eliminate panics based on throwing state by having (nearly) all APIs return aResult
Eliminate theContext
trait and make it just a struct, passingArguments
as a second parameter to Neon functions-
Rename<== let's try to avoid needing to do this, thanks to implicit downcasting in more contextsdowncast_or_throw()
-
Keep<== rejected: "context" suggests getting from local context, i.e.cx.global()
as-is and addcx.get::<JsFunction>("Array")?
this
-
Collapse all<== rejected: we'll try to make new back-compat frontends for everything when we create theContext
types exceptModuleContext
andFunctionContext
Env
struct post-1.0
- Add a private field to
Throw
so that it can't be constructed by users - New Borrow API
- Create functions from closures
- Make
Object::get()
return generic type to eliminate need for casts - Make
JsFunction::call()
return generic type to eliminate need for casts - Remove
JsResultExt
; it's redundant withResultExt
- No default backend
- Replace non-
usize
size/index arguments withusize
- Drop the type argument from
JsFunction
- Rename
cx.global()
tocx.global_object()
and addcx.global::<JsFunction>("Array")