Mercurial
comparison markdown_converter/BUILD @ 156:cd35e600ae34
[MarkDown Converter] Fixed few things and made a test
| author | June Park <parkjune1995@gmail.com> |
|---|---|
| date | Mon, 12 Jan 2026 15:20:39 -0800 |
| parents | bdcc610eeed8 |
| children | 1c0878eb17de |
comparison
equal
deleted
inserted
replaced
| 155:3bb45eb67906 | 156:cd35e600ae34 |
|---|---|
| 1 load("@rules_cc//cc:cc_library.bzl", "cc_library") | 1 load("@rules_cc//cc:cc_library.bzl", "cc_library") |
| 2 load("//gui_ze:gui_ze.bzl", "wasm_binary") | 2 load("//gui_ze:gui_ze.bzl", "wasm_binary", "bun_run", "move_files_into_dir") |
| 3 | 3 |
| 4 # JavaScript implementation (original) | 4 # JS only |
| 5 filegroup( | 5 filegroup( |
| 6 name = "markdown_to_html", | 6 name = "markdown_to_html", |
| 7 srcs = glob([ | 7 srcs = glob([ |
| 8 "**/*.js", | 8 "**/*.js", |
| 9 ], allow_empty=True), | 9 ], allow_empty=True), |
| 12 | 12 |
| 13 # C implementation for native use | 13 # C implementation for native use |
| 14 cc_library( | 14 cc_library( |
| 15 name = "markdown_to_html_c", | 15 name = "markdown_to_html_c", |
| 16 srcs = ["markdown_to_html.c"], | 16 srcs = ["markdown_to_html.c"], |
| 17 hdrs = ["markdown_to_html.h"], | |
| 18 visibility = ["//visibility:public"], | 17 visibility = ["//visibility:public"], |
| 19 ) | 18 ) |
| 20 | |
| 21 # WASM binary for browser FFI | |
| 22 wasm_binary( | |
| 23 name = "markdown_to_html_wasm", | |
| 24 src = "markdown_to_html_wasm.c", | |
| 25 exports = [ | |
| 26 "malloc", | |
| 27 "free", | |
| 28 "heap_reset", | |
| 29 "markdown_to_html", | |
| 30 "markdown_strlen", | |
| 31 ], | |
| 32 visibility = ["//visibility:public"], | |
| 33 ) | |
| 34 | |
| 35 |