Commit graph

8 commits

Author SHA1 Message Date
Rodion Borovyk
71bf9fb92d
Fix the native-bluetooth feature on macOS (#37476)
Fix the native-bluetooth feature on macOS builds. Enable the
native-bluetooth by default.

Testing: Added --features native-bluetooth to GH actions so the build
will fail if something is wrong. Don't know why it was not enabled
previously, please let me know if it is ok to leave the feature enabled.
Fixes: https://github.com/servo/servo/issues/37454

As for the numerous such warnings
```
warning: unexpected `cfg` condition value: `cargo-clippy`
   --> third_party/blurmac/src/framework.rs:480:43
    |
480 |             let uuidstring: *mut Object = msg_send![cbuuid, UUIDString];
    |                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: no expected values for `feature`
    = note: using a cfg inside a macro will use the cfgs from the destination crate and not the ones from the defining crate
    = help: try referring to `sel_impl` crate for guidance on how handle this unexpected cfg
    = help: the macro `sel_impl` may come from an old version of the `objc` crate, try updating your dependency with `cargo update -p objc`
    = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration
    = note: this warning originates in the macro `sel_impl` which comes from the expansion of the macro `msg_send` (in Nightly builds, run with -Z macro-backtrace for more info)
```

that macOS builds generates (mentioned
[here](https://github.com/servo/servo/pull/37439)) I found this:
https://github.com/SSheldon/rust-objc/issues/125. Also, in general the
`objc` crate seems to be stale and people are forking it, so maybe I
should start a Zulip conversation about migrating to something like this
https://github.com/madsmtm/objc2?

---------

Signed-off-by: Rodion Borovyk <rodion.borovyk@gmail.com>
2025-06-16 06:58:08 +00:00
Michael Mc Donnell
a27f2bb84d
Fix Rust-analyzer errors and warnings in blurmac (#37439)
I got 22 errors and 63 warnings when I opened the Servo project in
Visual Studio Code with the Rust-analyzer extension on Linux. The
`blurmac` package, which is vendored in the source tree, only needs to
be be compiled on macOS.

With this change I get zero errors and 2 unrelated warnings.

Testing: I don't have a mac and cannot test it there. I only tested it
building on Linux. I also did not test test the Bluetooth feature. I
think the change is pretty straightforward and unlikely to cause a major
regression.

Signed-off-by: Michael Mc Donnell <michael@mcdonnell.dk>
2025-06-14 06:08:07 +00:00
Simon Wülker
3d320fa96a
Update rustfmt to the 2024 style edition (#35764)
* Use 2024 style edition

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

* Reformat all code

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

---------

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
2025-03-03 11:26:53 +00:00
webbeef
1705473caa
Set a Rust edition for blurmac (#34618)
Signed-off-by: webbeef <me@webbeef.org>
2024-12-14 11:18:00 +00:00
RustAndMetal
f6a975fc58
clippy: Fix several warnings (#31710)
Signed-off-by: RustAndMetal <111676747+RustAndMetal@users.noreply.github.com>
2024-03-18 08:33:43 +00:00
Mucha Naibei
4efebf1e62
Fix clippy warnings in components/third_party (#31623) 2024-03-12 17:17:23 +00:00
Martin Robinson
98bd306816
mach: Do not use unstable rust for rustfmt (#31441)
We can use stable rust if we pass the unstable configuration as
command-line arguments to rustfmt itself. This prevents needing to
install an unstable rust toolchain.

The one downside here is that it doesn't seem that "ignore" is
supported so we have to start formatting the files in "third_party."
This shouldn't be a huge issue because we don't plan to check much more
rust code into those directories.
2024-02-28 13:53:04 +00:00
Martin Robinson
6a804cd775
Integrate the devices respository (#30974)
Despite the name of this dependency, it only handles bluetooth. Because
it's a separate repository. Integrating it, allows changes here to be
tested more consistently. In addition, it's likely that new bluetooth
libraries will allow removing the majority of the platform-specific code
in this directory.

This is based on the version of this dependency from:
https://github.com/servo/devices/pull/34
2024-01-09 09:13:41 +00:00