-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is this project still active #3
Comments
It seems it's not. @aqrln Alexey could you please comment on this: is this project abandoned or it just works fine despite the WIP warnings on the README.md 😃 I've seen that you do conduct some activity in this area, and I've read this PDF where you wrote that you're going to make a new release soon. In the end of that PDF though, you're writing that you're looking for a new maintainer for this crate. So it seems that one shoudn't use this crate in commercial production, or could they? |
I tried to run |
I'd recommend against that, right.
Yeah, you need to run |
@aqrln I'm working on a new napi & rust project: https://github.com/Brooooooklyn/napi-rs |
@Brooooooklyn yeah sure, your project looks awesome, and I don't even need that name anymore because if I were to continue working on this project, it would be called |
My #[macro_use]
extern crate napi_rs_derive;
use napi_rs::{Result, Value, CallContext, Number};
use std::convert::TryInto;
#[js_function(1)]
fn fibonacci<'env>(ctx: CallContext<'env>) -> Result<Value<'env, Number>> {
let n = ctx.get::<Number>(0)?.try_into()?;
ctx.env.create_int64(fibonacci_native(n))
}
#[inline]
fn fibonacci_native(n: i64) -> i64 {
match n {
1 | 2 => 1,
_ => fibonacci_native(n - 1) + fibonacci_native(n - 2)
}
} |
Cool! In my implementation the boilerplate for retrieving arguments from context is generated automatically too: #[napi::callback(fibonacci_js)]
fn fibonacci(env: Env, n: Number) -> Result<Number> {
Number::from_i64(env, fibonacci_native(n.to_i64()?))
} Would you want to add something similar or there are some drawbacks I didn't account for? |
How do you get My version is not simpler enough for now, I will make them easier to use in next version. Now I'm focusing developing ecosystem around my |
I guess it could be a parameter of special type?
That looks very cool! |
Is this project still active?
The text was updated successfully, but these errors were encountered: