Skip to content

Unable to use [email protected] on deno main #61

@rgbkrk

Description

@rgbkrk

At least as of denoland/deno@be7e2bd (and earlier), I can't import and use skia_canvas.

Example code in ffi_bug.ts:

import { createCanvas } from "https://deno.land/x/[email protected]/mod.ts";

const canvas = createCanvas(800, 250);

Running it:

➜ cargo run -- --unstable run --allow-all ffi_bug.ts
   Compiling semver v1.0.14
   Compiling napi_sym v0.50.0 (/Users/kai/code/src/github.com/denoland/deno/cli/napi/sym)
   Compiling rustc_version v0.4.0
   Compiling curve25519-dalek v4.1.1
   Compiling x25519-dalek v2.0.0
   Compiling deno_node v0.57.0 (/Users/kai/code/src/github.com/denoland/deno/ext/node)
   Compiling deno_crypto v0.134.0 (/Users/kai/code/src/github.com/denoland/deno/ext/crypto)
   Compiling deno_kv v0.28.0 (/Users/kai/code/src/github.com/denoland/deno/ext/kv)
   Compiling deno_runtime v0.128.0 (/Users/kai/code/src/github.com/denoland/deno/runtime)
   Compiling deno v1.37.1 (/Users/kai/code/src/github.com/denoland/deno/cli)
    Finished dev [unoptimized + debuginfo] target(s) in 1m 13s
     Running `target/debug/deno --unstable run --allow-all ffi_bug.ts`
error: Uncaught (in promise) TypeError: expected typed ArrayBufferView
const METRICS_PTR = Deno.UnsafePointer.of(METRICS);
                                       ^
    at Function.of (ext:deno_ffi/00_ffi.js:230:23)
    at https://deno.land/x/[email protected]/src/context2d.ts:191:40
    at eventLoopTick (ext:core/01_core.js:183:11)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions