view markdown_converter/BUILD @ 155:3bb45eb67906

[Postdog] Updated variables names and padding sizes. Needs more work.
author June Park <parkjune1995@gmail.com>
date Mon, 12 Jan 2026 09:12:31 -0800
parents bdcc610eeed8
children cd35e600ae34
line wrap: on
line source

load("@rules_cc//cc:cc_library.bzl", "cc_library")
load("//gui_ze:gui_ze.bzl", "wasm_binary")

# JavaScript implementation (original)
filegroup(
  name = "markdown_to_html",
  srcs = glob([
      "**/*.js",
  ], allow_empty=True),
  visibility = ["//visibility:public"],
)

# C implementation for native use
cc_library(
  name = "markdown_to_html_c",
  srcs = ["markdown_to_html.c"],
  hdrs = ["markdown_to_html.h"],
  visibility = ["//visibility:public"],
)

# WASM binary for browser FFI
wasm_binary(
  name = "markdown_to_html_wasm",
  src = "markdown_to_html_wasm.c",
  exports = [
    "malloc",
    "free",
    "heap_reset",
    "markdown_to_html",
    "markdown_strlen",
  ],
  visibility = ["//visibility:public"],
)