https://discord.cloudflare.com logo
Join Discord
Powered by
# workers-discussions
  • c

    Ceru ©

    01/28/2021, 5:19 PM
    dang
  • c

    Ceru ©

    01/28/2021, 5:21 PM
    i wonder if it would be possible to download and run from KV 🤔
  • p

    Peps

    01/28/2021, 5:22 PM
    I wonder if it's even at all possible to run chromium in a service worker environment
  • c

    Ceru ©

    01/28/2021, 5:22 PM
    oh yea its been done
  • p

    Peps

    01/28/2021, 5:22 PM
    oh huh
  • c

    Ceru ©

    01/28/2021, 5:22 PM
    p sure AWS Lambda is service worker right?
  • p

    Peps

    01/28/2021, 5:22 PM
    think that could be a node.js environment
  • g

    Greg Brimble | Cloudflare Pages

    01/28/2021, 5:23 PM
    It's difficult-to-impossible to execute arbitrary code in Workers that you've loaded in from another source. I'm curious what you're trying to use Chromium to do?
  • c

    Ceru ©

    01/28/2021, 5:24 PM
    dang
  • c

    Ceru ©

    01/28/2021, 5:24 PM
    im trying to see if i could get away with creating a HTML to image service
  • c

    Ceru ©

    01/28/2021, 5:24 PM
    i made a app for my company last year and while its fine, i just want to see what else i could do with it
  • g

    ginkoid

    01/28/2021, 5:27 PM
    no idea if it will work, but you might be able to run something like librsvg in wasm
  • g

    ginkoid

    01/28/2021, 5:27 PM
    definitely not chromium tho
  • k

    kristian

    01/28/2021, 5:45 PM
    have wanted to do something very similar 😦
  • c

    Ceru ©

    01/28/2021, 5:57 PM
    from my research i dont think its possible with a service worker environment
  • c

    Ceru ©

    01/28/2021, 5:57 PM
    the conversion from format to image just requires too much low level code
  • e

    Erwin

    01/28/2021, 10:54 PM
    AWS Lambda is a full blown Linux distribution where you can install native libraries in etc. Even so, installing chromium in there isn't trivial.
  • t

    theGagne

    01/29/2021, 12:51 AM
    I wanted ffmpeg wasm in worker but it was too big... I once got a stripped down ffmpeg to around 800kb but it wasn’t functional and getting it to work in a worker was well beyond my grasp.
  • t

    theGagne

    01/29/2021, 12:51 AM
    Was thinking thumbnail generation or even very short transcodes could be possible.
  • j

    JustinNoel

    01/29/2021, 6:34 AM
    Have you looked at Microsoft Playwright or Puppeteer? I've used both but prefer Playwright. They both have screenshot capability. I'm also doing an HTML to image project and using Playwright for it. I tried to get it to work on Workers, but not luck. So, I'm using Digital Ocean Apps platform with Cloudflare Workers KV to track requests, limit access, etc
  • c

    Ceru ©

    01/29/2021, 6:35 AM
    without access to run executables and such its a no go
  • c

    Ceru ©

    01/29/2021, 6:36 AM
    also playwright looks like just another Puppeteer clone imo
  • c

    Ceru ©

    01/29/2021, 6:41 AM
    the most realistic way you could do it without script size limits is to push something like LibrSVG to WASM with all of its deps
  • c

    Ceru ©

    01/29/2021, 6:41 AM
    you need access to run sub processes for Puppeteer to work which sucks but understandable
  • c

    Ceru ©

    01/29/2021, 6:42 AM
    i'd love to see if i can hack it together but im just not sure how much time i can spend on this x.x
  • u

    617a7a

    01/29/2021, 10:52 AM
    hi, this is off-topic but very interesting. if anyone’s interested in decentralisation, deplatforming or crypto you should check out https://stacks.co
  • u

    617a7a

    01/29/2021, 10:52 AM
    their discord is also here https://discord.gg/Rqc6YGKGmm (not advertising, it’s not my server but there for anyone interested)
  • u

    617a7a

    01/29/2021, 10:53 AM
    traction and attention from cloudflare might be beneficial for both sides, though it’s just an idea
  • k

    kristian

    01/29/2021, 4:51 PM
    morning 👋
  • u

    617a7a

    01/29/2021, 5:43 PM
    rise n shine
1...757677...2509Latest