Skip to content
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

[neon-build]: How to use build options #675

Closed
ssssota opened this issue Jan 28, 2021 · 4 comments
Closed

[neon-build]: How to use build options #675

ssssota opened this issue Jan 28, 2021 · 4 comments

Comments

@ssssota
Copy link

ssssota commented Jan 28, 2021

Can I use build options?

I checked this example.
And I tried this in windows 10, rustc 1.49.0 and neon 0.7.0.

build.rs

extern crate neon_build;

fn main() {
    neon_build::Setup::options()
        .output_dir("../dist")
        .setup();
}

then

> neon build --release

neon info forcing rebuild for new build settings
neon info running cargo
   Compiling semver-parser v0.7.0
   Compiling cfg-if v1.0.0
   Compiling smallvec v1.6.1
   Compiling cslice v0.2.0
   Compiling neon-sys v0.7.0
   Compiling hello-project v0.1.0 (D:\Dev\hello-project\native)
   Compiling neon v0.7.0
error[E0433]: failed to resolve: could not find `Setup` in `neon_build`
 --> build.rs:4:17
  |
4 |     neon_build::Setup::options()
  |                 ^^^^^ could not find `Setup` in `neon_build`

error: aborting due to previous error

Sorry, I can't use English well.
And I don't know Rust well.

Thank you.

@kjvalencik
Copy link
Member

These build options are only available with the napi backend. Please ensure you are using the napi backend.

@ssssota
Copy link
Author

ssssota commented Jan 29, 2021

@kjvalencik
How to use napi backend?

@kjvalencik
Copy link
Member

@ssssota It's feature flag based. There are some additional details in the "manual steps" section. #444

@ssssota
Copy link
Author

ssssota commented Jan 30, 2021

@kjvalencik
Thank you so much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants