File tree Expand file tree Collapse file tree 4 files changed +15
-15
lines changed
Expand file tree Collapse file tree 4 files changed +15
-15
lines changed Original file line number Diff line number Diff line change 11/**
2- * ${LIB_TITLE} WASM Benchmarks
2+ * Libtiff WASM Benchmarks
33 */
44
5- import $ { LIB_TITLE } WASM from "../src/lib/index.ts"
5+ import LibtiffWASM from "../src/lib/index.ts"
66
7- Deno . bench ( "${LIB_NAME} initialization" , {
7+ Deno . bench ( "libtiff initialization" , {
88 baseline : true
99} , async ( ) => {
10- const lib = new $ { LIB_TITLE } WASM ( )
10+ const lib = new LibtiffWASM ( )
1111 await lib . initialize ( )
1212} )
Original file line number Diff line number Diff line change 11/**
2- * @module ${LIB_TITLE} WASM
3- * TypeScript-first ${LIB_TITLE} library for WebAssembly
2+ * @module Libtiff WASM
3+ * TypeScript-first Libtiff library for WebAssembly
44 */
55
6- export default class $ { LIB_TITLE } WASM {
6+ export default class LibtiffWASM {
77 private module : any = null
88 private initialized = false
99
@@ -18,8 +18,8 @@ export default class ${LIB_TITLE}WASM {
1818 private async loadWASM ( ) : Promise < any > {
1919 // Try local build first
2020 const localPaths = [
21- './../../install/wasm/${LIB_NAME} -main.js' ,
22- './../../install/wasm/${LIB_NAME} -release.js' ,
21+ './../../install/wasm/libtiff -main.js' ,
22+ './../../install/wasm/libtiff -release.js' ,
2323 ]
2424
2525 for ( const path of localPaths ) {
@@ -32,6 +32,6 @@ export default class ${LIB_TITLE}WASM {
3232 }
3333 }
3434
35- throw new Error ( 'Failed to load ${LIB_NAME} .wasm' )
35+ throw new Error ( 'Failed to load libtiff .wasm' )
3636 }
3737}
Original file line number Diff line number Diff line change 11/**
2- * Type definitions for ${LIB_TITLE} WASM
2+ * Type definitions for Libtiff WASM
33 */
44
5- export interface $ { LIB_UPPER } Module {
5+ export interface LIBTIFFModule {
66 _malloc : ( size : number ) => number
77 _free : ( ptr : number ) => void
88 HEAPU8 : Uint8Array
99 setValue : ( ptr : number , value : number , type : string ) => void
1010 getValue : ( ptr : number , type : string ) => number
1111}
1212
13- export class $ { LIB_UPPER } Error extends Error {
13+ export class LIBTIFFError extends Error {
1414 constructor ( message : string ) {
1515 super ( message )
16- this . name = '${LIB_UPPER}Error '
16+ this . name = 'LIBTIFFError '
1717 }
1818}
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ Deno.test("Deno runtime features", () => {
77
88Deno . test ( "WASM file accessibility" , async ( ) => {
99 try {
10- const wasmFile = await Deno . stat ( "./install/wasm/${LIB_NAME} -main.wasm" )
10+ const wasmFile = await Deno . stat ( "./install/wasm/libtiff -main.wasm" )
1111 assert ( wasmFile . isFile , "WASM file should exist" )
1212 assert ( wasmFile . size > 0 , "WASM file should not be empty" )
1313 console . log ( `✅ Found WASM file: ${ wasmFile . size } bytes` )
You can’t perform that action at this time.
0 commit comments