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

added rust support #50

Merged
merged 6 commits into from
Feb 28, 2024
Merged

added rust support #50

merged 6 commits into from
Feb 28, 2024

Conversation

cocoa-xu
Copy link
Contributor

@cocoa-xu cocoa-xu commented Feb 28, 2024

Hi @nihui, this PR adds rust support for ruapu. It should close #13 /

@nihui
Copy link
Owner

nihui commented Feb 28, 2024

The glue that binds two languages is mixed in C
Let's move them into their own folders

|ruapu.h
|main.c
|
|python+
|      |ruapu-binding.c
|      |pyproject.toml
|
|rust+
|    |Cargo.toml
|    |lib.rs

@cocoa-xu
Copy link
Contributor Author

The glue that binds two languages is mixed in C Let's move them into their own folders

|ruapu.h
|main.c
|
|python+
|      |ruapu-binding.c
|      |pyproject.toml
|
|rust+
|    |Cargo.toml
|    |lib.rs

No problem! It's done now~ Although I'm not quite sure which option I should use to specify the location of the pyproject.toml file in the pypa/cibuildwheel step in pypi.yml...

@nihui
Copy link
Owner

nihui commented Feb 28, 2024

The glue that binds two languages is mixed in C Let's move them into their own folders

|ruapu.h
|main.c
|
|python+
|      |ruapu-binding.c
|      |pyproject.toml
|
|rust+
|    |Cargo.toml
|    |lib.rs

No problem! It's done now~ Although I'm not quite sure which option I should use to specify the location of the pyproject.toml file in the pypa/cibuildwheel step in pypi.yml...

pypa/cibuildwheel has some options

  package-dir:
    description: 'Input directory, defaults to "."'
    required: false
    default: .
  output-dir:
    description: 'Folder to place the outputs in, defaults to "wheelhouse"'
    required: false
    default: wheelhouse
  config-file:
    description: 'File containing the config, defaults to {package}/pyproject.toml'
    required: false
    default: ''

@cocoa-xu
Copy link
Contributor Author

ruapu::rua() is added to the Rust binding. I'll leave the python one in #51
/cc @Yoh-Z

@nihui nihui merged commit 550a9ca into nihui:master Feb 28, 2024
9 of 10 checks passed
@nihui
Copy link
Owner

nihui commented Feb 28, 2024

Thanks for your contribution !

@cocoa-xu cocoa-xu deleted the cx/rust branch February 28, 2024 15:53
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

Successfully merging this pull request may close these issues.

Add rust support
2 participants