Skip to content

Get Servo working on Windows #1908

Closed
Closed

Description

@kmcallister

Stuff we need to implement for sure:

  • Build system (Rust uses MinGW/MSYS; we can do the same)
  • Font loading
  • Sending OpenGL textures between GL contexts and (eventually) between processes

And then there's probably a lot of other work we don't know about.

See src/platform/ and src/support/layers/rust-layers/platform/.

Rust already works but some of the things we use may be missing.

We will never, ever support Windows XP.

Activity

  1. Ms2ger commented on Jun 5, 2014

    @Ms2ger
    Contributor

    Windows might not be so happy about the 80 -L arguments we pass to rustc.

  2. Manishearth commented on Feb 10, 2015

    @Manishearth
    Member

    Going to use this as a tracking issue

  3. Manishearth commented on Feb 10, 2015

    @Manishearth
    Member

    Status

    Native bindings:

    Bindings that need to be written:

    OpenGL stuff: I don't know what the status on this is.

    Build system: Since Rust only supports MinGW, we'll stick to that.

    • mach is not cygpath friendly

    CI: To be looked into later. Much later. Appveyor may work for deps but it's hard getting the env set u

    Other blockers:

    In the longer term we'd need to add VS support to Rust, which mainly consists of getting librustc_back to support other linkers.

  4. Manishearth commented on Feb 10, 2015

    @Manishearth
    Member
  5. Manishearth commented on Feb 10, 2015

    @Manishearth
    Member

    Makefile notes (servo/rust-harfbuzz#36, servo/mozjs#27):

    Check for Windows (ifeq (windows,$(findstring windows,$(TARGET)))), then do the following:

    • OUT_DIR:=$(shell cygpath "$(OUT_DIR)")
    • ifeq (cc,$(CC)), set CC = gcc, CPP = gcc -E
  6. retep998 commented on Feb 10, 2015

    @retep998
  7. Manishearth commented on Feb 10, 2015

    @Manishearth
    Member

    We'd need to make Hyper and Servo SSL-backend-agnostic then, which sounds like more work.

    Besides, the handling of cookies depends on libcrypto. If we get openssl on msys2 that should be enough, otherwise it's not too hard to just build it (we do this for Android already)

    Native windows methods sound good. Even better if we can wrap it in an API that's like fontconfig or something.

  8. tomaka commented on Feb 10, 2015

    @tomaka

    Glutin (should just work)

    The Windows implementation of glutin is actually the one that I trust the most. I think you can check this box.

  9. abonander commented on Feb 11, 2015

    @abonander

    I would like to volunteer fontconfig-rs for cross-platform font location. It doesn't technically have OS X or Windows support yet but it's really just a matter of having it pass a custom config to fontconfig that tells it where the fonts live on those platforms, though fontconfig itself would have to be built for Windows. GIMP is already doing it.

    I'm considering having fontconfig-rs pull in the source for fontconfig and build it on Windows platforms so the user doesn't have to bother fetching it.

    @retep998 Has winapi-rs touched those font APIs yet?

  10. retep998 commented on Feb 11, 2015

    @retep998

    @cybergeek94 No but I can easily add any methods needed.

  11. vvuk commented on Feb 11, 2015

    @vvuk
    Contributor

    For fontconfig, is what's needed just font selection, which is then passed to Skia for shaping and rasterization? Win32 fontconfig already exists as part of the win32 gtk+ port as was mentioned above, so it may be possible to just use that along with fontconfig-rs. Bundling all these DLLs (openssl, fontconfig, etc.) together in a "servo-win32-support" package would probably be helpful so that people don't have to download everything individually.

    I can help with the GL texture sharing cross context/process stuff.

  12. 36 remaining items

  13. vvuk commented on Aug 13, 2015

    @vvuk
    Contributor

    Note that I think that it's acceptable to have an initial Servo-on-Windows have dependencies such as: requires msys2/mingw64 build env; requires clang-cl (or real msvc) to build some modules; etc. We can then remove them over time but at least we have something that can be hacked on.

  14. pcwalton commented on Aug 13, 2015

    @pcwalton
    Contributor

    Note that we'll need some kind of ipc-channel port now.

  15. vvuk commented on Aug 13, 2015

    @vvuk
    Contributor

    Writing the code is the super easy part of all this. I will happily write code all day long. It's fighting with build system cruft that's the painful bit..

  16. waddlesplash commented on Aug 13, 2015

    @waddlesplash

    Note that we'll need some kind of ipc-channel port now.

    Windows' named pipes? They aren't very secure (if you know the name of the pipe, you can read stuff off of it, essentially) but they're tried, true, and fast.

  17. jasonwilliams commented on Sep 7, 2015

    @jasonwilliams
    Contributor

    is there any low-hanging-fruit i can help with?

  18. Manishearth commented on Sep 7, 2015

    @Manishearth
    Member

    Not that I know of, though @vvuk might have some tasks he can delegate

  19. retep998 commented on Sep 8, 2015

    @retep998

    Someone can always go write a Rust library around DirectWrite, especially since there are raw bindings to it.

  20. vvuk commented on Sep 8, 2015

    @vvuk
    Contributor

    My current plan is to get things compiling, stubbing out as necessary along
    the way even if the final result doesn't work. Then it will be much easier
    to parallelize getting things to work, since people won't be fighting the
    build the entire time. I hope to have things compiling in the next day or
    two, then a day of submitting PRs and replicating the work from scratch.
    On Sep 7, 2015 5:08 PM, "Manish Goregaokar" [email protected]
    wrote:

    Not that I know of, though @vvuk https://github.com/vvuk might have
    some tasks he can delegate

    —
    Reply to this email directly or view it on GitHub
    #1908 (comment).

  21. waddlesplash commented on Sep 8, 2015

    @waddlesplash

    Someone can always go write a Rust library around DirectWrite, especially since there are raw bindings to it.

    FWIW, I really do not like the way Chrome (at least) looks with DirectWrite turned on. Maybe that's Chrome's fault and not DirectWrite, but I prefer Firefox's font rendering on Windows by a lot. Ubuntu's default font rendering settings surpass it by a lot, though.

  22. retep998 commented on Sep 8, 2015

    @retep998

    Maybe that's Chrome's fault and not DirectWrite, but I prefer Firefox's font rendering on Windows by a lot.

    Firefox also uses DirectWrite on Windows. There's a ton of tweaking you can do to adjust how text is rendered.

  23. added a commit that references this issue on Sep 9, 2015
  24. waddlesplash commented on Oct 6, 2015

    @waddlesplash
  25. larsbergstrom commented on Jan 27, 2016

    @larsbergstrom
    Contributor

    Landed in #9385!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-infrastructureB-feature-trackingB-high-valueE-very-complexP-windows

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions