Atualizações do Harbour 07-07-2025

Projeto [x]Harbour - Compilador de código aberto compatível com o Clipper.

Moderador: Moderadores

Avatar do usuário
Itamar M. Lins Jr.
Administrador
Administrador
Mensagens: 7928
Registrado em: 30 Mai 2007 11:31
Localização: Ilheus Bahia
Curtiu: 1 vez

Atualizações do Harbour 07-07-2025

Mensagem por Itamar M. Lins Jr. »

Olá!
Vamos que vamos!
Segundo informações do Grok, vamos ter possibilidade de mudar código Harbour para Javascript.
...
A atualização mencionada adiciona suporte inicial para compilar o Harbour em JavaScript/WebAssembly usando o Emscripten, um compilador que converte código C/C++ em WebAssembly (WASM) para execução em navegadores ou ambientes JavaScript. Aqui está uma explicação detalhada na linguagem de programação Harbour, com base nas mudanças listadas:
etc...
Explicação Técnica para Desenvolvedores HarbourCompilação para WebAssembly:O Emscripten converte o código Harbour (escrito em C e compilado para binários nativos) em WebAssembly, permitindo que aplicações Harbour sejam executadas em navegadores ou ambientes Node.js.
Para compilar, use as configurações HB_PLATFORM=wasm, HB_COMPILER=emcc e HB_BUILD_3RDEXT=no no hbmk2. Exemplo:bash

hbmk2 meu_projeto.prg -plat=wasm -comp=emcc -3rdext=no

Isso gera um arquivo .wasm e, opcionalmente, um .js para integração com JavaScript.

Código: Selecionar todos

2025-07-07 16:17 UTC+0200 Aleksander Czajczynski (hb fki.pl)
  * config/win/clang.mk
    + add resource compiler detection chain to first stage,
      now harbour.exe binary should also have manifest resource
      compiled in when clang is used. Previously second stage rc
      calling was implemented only in hbmk2.

  * utils/hbmk2/hbmk2.prg
    ! fixed disappearing llvm-ar with fallback to ar, spotted
      in windows-ci/MSYS2

2025-07-07 13:42 UTC+0200 Aleksander Czajczynski (hb fki.pl)
  * .github/workflows/windows-ci.yml
    * libgd, qt5-base not available in MSYS x86

  * ChangeLog.txt
    + entry in prev skipped during merge

2025-07-05 20:20 UTC+0200 Aleksander Czajczynski (hb fki.pl)
  + config/wasm/global.mk
  + config/wasm/libs.mk
  + config/wasm/emcc.mk
  * utils/hbmk2/hbmk2.prg
  * contrib/hbrun/hbrun.hbp
    + add basic support for build Harbour into JS/WebAssembly using
      emscripten, using these settings:
        HB_PLATFORM=wasm HB_COMPILER=emcc HB_BUILD_3RDEXT=no

    * {abstr} is now a hbmk2 keyword to possibly group all
      toolsets similar in flavour: WASI/clang, JS/emscripten
[center][/center]      These most likely will be targeting plaforms which are not
      full operating-systems, they are also commonly qualified as
      sandbox solutions.

    * introduced __PLATFORM__WASM and __PLATFORM__ABSTRACT .prg defines

  * utils/hbmk2/hbmk2.prg
    + allow to specify hb_ProgName() value at build-time for platforms
      where the function cannot return a meaningful value (f.e.
      JS/WebAssembly)
    ; TODO: Add support for passing hb_ProgName() value command-line
            parameter, f.e. `--hb:self=hbrun`

  * config/global.mk
  * include/hbsetup.h
    * consider abstract/emscripten targets similar to linux-like

  * src/rtl/arc4.c
    ! fix to build under emscripten (which is assumed to be a
      linux-like environment)

  * src/vm/extrap.c
    ! emscripten mimics UNIX/Linux to some extent, but there is no
      sigaltstack() implementation

  ; though platform/compiler names are not currently compatible
    with origin, this WebAssembly platform support was guided by
    Harbour 3.4:
    2017-06-09 01:10 UTC Viktor Szakats (vszakats users.noreply.github.com)
    as usual Viktor was here before, many thanks!

  ; example project, how to make a multi-platform GUI application which
    also targets WebAssembly, can be found here:
    https://github.com/alcz/harbour-cimgui-sokol-starterkit/
Saudações,
Itamar M. Lins Jr.
Saudações,
Itamar M. Lins Jr.
Responder