Skip to content

Commit

Permalink
Merge pull request #13 from rodneylab/ci__update_ci_config
Browse files Browse the repository at this point in the history
ci: 🐝 update CI config
  • Loading branch information
rodneylab authored Jul 30, 2024
2 parents 61dcf4f + a60eaaa commit d03d261
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 17 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/deno.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,23 @@ on:
- main
permissions: read-all
jobs:
# wasm-check:
# runs-on: ubuntu-latest
# steps:
# - name: Harden Runner
# uses: step-security/harden-runner@0d381219ddf674d61a7572ddd19d7941e271515c # v2.9.0
# with:
# egress-policy: audit
# disable-telemetry: true
# - name: Clone repository
# uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
# - uses: dtolnay/rust-toolchain@4f366e621dc8fa63f557ca04b8f4361824a35a45 # stable
# - name: Install Deno
# uses: denoland/setup-deno@ba9dcf3bc3696623d1add6a2f5181ee1b5143de5 # v1.3.0
# with:
# deno-version: v1.x
# - name: Check Wasm up-to-date
# run: deno task wasmbuild --check
deno-check:
runs-on: ubuntu-latest
steps:
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ rust-version = "1.73"
description = "Markdown processing"

[lib]
crate_type = ["cdylib"]
crate-type = ["cdylib"]

[profile.release]
codegen-units = 1
Expand Down
32 changes: 16 additions & 16 deletions lib/parsedown.generated.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// deno-fmt-ignore-file
/// <reference types="./parsedown.generated.d.ts" />

// source-hash: 2b57a7db516cd2779b8b062ba8544d61c9d51458
// source-hash: 822eab45d97c033ea2aa121a433dee7c83c6b6b4
let wasm;

const heap = new Array(128).fill(undefined);
Expand Down Expand Up @@ -50,18 +50,6 @@ function addHeapObject(obj) {
return idx;
}

function dropObject(idx) {
if (idx < 132) return;
heap[idx] = heap_next;
heap_next = idx;
}

function takeObject(idx) {
const ret = getObject(idx);
dropObject(idx);
return ret;
}

let WASM_VECTOR_LEN = 0;

const cachedTextEncoder = typeof TextEncoder !== "undefined"
Expand Down Expand Up @@ -127,6 +115,18 @@ function getInt32Memory0() {
return cachedInt32Memory0;
}

function dropObject(idx) {
if (idx < 132) return;
heap[idx] = heap_next;
heap_next = idx;
}

function takeObject(idx) {
const ret = getObject(idx);
dropObject(idx);
return ret;
}

let cachedFloat64Memory0 = null;

function getFloat64Memory0() {
Expand Down Expand Up @@ -319,9 +319,6 @@ const imports = {
const ret = getStringFromWasm0(arg0, arg1);
return addHeapObject(ret);
},
__wbindgen_object_drop_ref: function (arg0) {
takeObject(arg0);
},
__wbindgen_number_new: function (arg0) {
const ret = arg0;
return addHeapObject(ret);
Expand Down Expand Up @@ -362,6 +359,9 @@ const imports = {
__wbg_set_a47bac70306a19a7: function (arg0, arg1, arg2) {
getObject(arg0).set(getObject(arg1), arg2 >>> 0);
},
__wbindgen_object_drop_ref: function (arg0) {
takeObject(arg0);
},
__wbindgen_error_new: function (arg0, arg1) {
const ret = new Error(getStringFromWasm0(arg0, arg1));
return addHeapObject(ret);
Expand Down
Binary file modified lib/parsedown_bg.wasm
Binary file not shown.
2 changes: 2 additions & 0 deletions rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[toolchain]
channel = "stable"

0 comments on commit d03d261

Please sign in to comment.