Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

207
Visualizações
Run a CLI Go application on a webpage using WebAssembly

I have been working with the brilliant Go program go-nexrad. I am able to run this on my computer (M1 MacBook Pro) with some setup:

git clone https://github.com/bwiggs/go-nexrad.git
cd go-nexrad && cd cmd && cd nexrad-render

# these two commands are just to download radar files
aws s3 cp --no-sign-request s3://noaa-nexrad-level2/2017/08/25/KCRP/KCRP20170825_235733_V06 .
aws s3 cp --no-sign-request s3://noaa-nexrad-level2/2022/04/18/KLWX/KLWX20220418_153931_V06 .

go get -u golang.org/x/sys

I can then run a command such as go run . -f KCRP20170825_235733_V06 -s 2048 -p ref to generate a radar.png file in the same directory.

I am aware of WebAssembly being able to compile Go programs to run on a webpage, but I am unsure how to interact with a CLI application such as this one using this framework. I have found several guides online, but they are for simple applications where the program just takes user input and then logs the result to the console.

This program is slightly more complex, as it has to write an entirely new png file.

Does anybody know of a way that I can work with this project in such a way that I can interact with the relevant CLI commands, e.g. specifying a radar file and setting the product via command flags, and have it run on a webpage?

Any advice would be appreciated.

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda