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

Improve rust bindings #513

Merged
merged 3 commits into from
Feb 25, 2025
Merged

Conversation

krtab
Copy link
Collaborator

@krtab krtab commented Feb 24, 2025

No description provided.

@krtab krtab force-pushed the improve_rust_bindings branch 2 times, most recently from 5c6e6bc to f21d72c Compare February 24, 2025 17:39
@krtab krtab force-pushed the improve_rust_bindings branch from f21d72c to 18b691a Compare February 24, 2025 17:40
@krtab krtab force-pushed the improve_rust_bindings branch 2 times, most recently from 24bc2cb to f3c09ff Compare February 25, 2025 13:31
@krtab krtab force-pushed the improve_rust_bindings branch from f3c09ff to c1924c9 Compare February 25, 2025 13:59
@@ -37,12 +37,12 @@ let compile ~includes:_ ~opt_lvl:_ debug (files : Fpath.t list) :

let rustc_cmd : Cmd.t =
Cmd.(
rustc_bin % "--target=wasm32-unknown-unknown" % "--extern"
rustc_bin % "--target=wasm32-unknown-unknown" % "--edition=2021"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you explain to me quickly why the edition=2021 is needed? (This is simply out of curiosity and not blocking in anyway)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's because Arthur broke rust in rust-lang/rust#129321.

and wants to avoid using the broken version.

(jk 😅)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure, suddenly owi rustc didn't find the owi crate without extern crate which is something that only existed in edition 2015 of rust and has become optional since rust 2018. I am not sure which it only triggered now, maybe differences between the CI rustc and mine ?

let x = u32_symbol();
let c = char::from_u32(x).unwrap_or_else(|| stop_exploration());
c
Symbolic::symbol()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would vote for removing all of them now. It is not as if they were used a lot and we would break any existing workflow... WDYT?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could, but I thought better safe than sorry, especially if we want old code to work as is easily

@zapashcanon
Copy link
Member

Thanks!

@zapashcanon zapashcanon merged commit fef8244 into OCamlPro:main Feb 25, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants