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

svix-bridge: jemalloc cannot be enabled on msvc #1083

Open
davehorner opened this issue Sep 27, 2023 · 5 comments
Open

svix-bridge: jemalloc cannot be enabled on msvc #1083

davehorner opened this issue Sep 27, 2023 · 5 comments
Assignees
Labels
server Issues regarding the server component

Comments

@davehorner
Copy link

Description

git clone https://github.com/svix/svix-webhooks
cd svix-webhooks\bridge
cargo run

produces

Compiling svix-bridge v1.12.0 (C:\working\rust\svix-webhooks\bridge\svix-bridge)
error: jemalloc cannot be enabled on msvc
  --> svix-bridge\src\main.rs:33:1
   |
33 | compile_error!("jemalloc cannot be enabled on msvc");
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: could not compile `svix-bridge` (bin "svix-bridge") due to previous error

versions

svix-bridge v1.12.0 (C:\working\rust\svix-webhooks\bridge\svix-bridge)
├── svix-bridge-plugin-queue v0.1.0 (C:\working\rust\svix-webhooks\bridge\svix-bridge-plugin-queue)
│   ├── omniqueue v0.1.0 (https://github.com/svix/omniqueue-rs?rev=247904053bcf90cf693df4429092923bf97770eb#24790405)
│   ├── svix-bridge-types v0.1.0 (C:\working\rust\svix-webhooks\bridge\svix-bridge-types)
│   │   ├── svix v0.85.1
├── svix-bridge-types v0.1.0 (C:\working\rust\svix-webhooks\bridge\svix-bridge-types) (*)
├── svix-ksuid v0.7.0
svix-bridge-plugin-queue v0.1.0 (C:\working\rust\svix-webhooks\bridge\svix-bridge-plugin-queue) (*)
svix-bridge-types v0.1.0 (C:\working\rust\svix-webhooks\bridge\svix-bridge-types) (*)

Platform

windows 10 64bit

@svix-onelson
Copy link
Contributor

@davehorner Thanks for this report.

It's true that jemalloc is on by default, and won't work with the standard Windows toolchain.

I think we can make it more automatic, but for a workaround you should be able to build/run by passing --no-default-features --features gcp-pubsub,rabbitmq,redis,sqs to cargo.

@davehorner
Copy link
Author

That does indeed produce a binary, thank you very much for the quick response @svix-onelson!

@davehorner davehorner changed the title jemalloc cannot be enabled on msvc svix-bridge: jemalloc cannot be enabled on msvc Sep 27, 2023
@svix-onelson svix-onelson self-assigned this Sep 27, 2023
@svix-onelson
Copy link
Contributor

To refine the definition of done beyond the initial report, we'll have the same exact issue in svix-server since both of these binaries use the same tactic to configure jemalloc by default.

There are a couple of approaches I can think of off the top of my head to smooth this out so Windows builds "just work" by default, so I'll plan to try them out and pick whichever feels best -- likely next week.

@tasn tasn assigned svix-aaron1011 and unassigned svix-onelson Oct 2, 2023
@svix-onelson
Copy link
Contributor

Some notes for @svix-aaron1011 from our planning today:

  • might be necessary to have a crate that bundles up the jemalloc deps, which can always safely be added to the default features list.
  • the crate can simply re-export the 2 deps entirely since this only serves to fix the "default features" problem. cfg can be used in dependents to avoid using/accessing modules and types only exported for non-mvsc.
  • extra detail this crate will need to be used in bridge and server (both) so it makes sense to add it at the top-level of the repo, or in a separate repo.

@davehorner
Copy link
Author

This ticket is still open; let me know if I can help move it forward, I'm still using feature flags to get around this.

@tasn tasn added good first issue server Issues regarding the server component labels Sep 29, 2024
@tasn tasn assigned svix-onelson and unassigned svix-aaron1011 Sep 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
server Issues regarding the server component
Projects
None yet
Development

No branches or pull requests

5 participants