0.0.7 • Published 6 months ago

@eliasku/vite-plugin-wasm-c v0.0.7

Weekly downloads
-
License
UNLICENSED
Repository
-
Last release
6 months ago

Vite plugin for building C files

Plugin provides vite commands to build and watch C source files without stdlib using llvm toolchain.

Examples

Usage

Import cc plugin function

import { cc } from "@eliasku/vite-plugin-wasm-c";

Add cc plugin to your vite config:

plugins: [
    // ...
    cc({
        // set LLVM installation path, `process.env.LLVM_PATH` by default
        llvm: "/usr/local/opt/llvm",
        // regular expression to allow watch your C source-code files
        watch: /src\/(wasm|include)\/.*\.[hc]$/,
        // translation units array to build and link
        sources: [
            "./src/wasm/main.c",
        ],
        // additional header search path directories
        headerSearchPath: [
            "./src/include",
        ],
        // change default output filename
        output: "main.wasm",
    }),
    // ...
],
0.0.7

6 months ago

0.0.6

6 months ago

0.0.5

7 months ago

0.0.4

7 months ago

0.0.3

7 months ago

0.0.2

7 months ago

0.0.1

7 months ago