This repository has been archived by the owner on Jun 17, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
42 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,7 @@ | ||
FROM maxmcd/deno:_build-cache | ||
|
||
RUN git pull origin master | ||
RUN ./tools/build_third_party.py | ||
RUN gn gen out/Default/ --args='is_debug=false use_allocator="none" cc_wrapper="ccache" use_custom_libcxx=false use_sysroot=false' | ||
RUN ccache -s | ||
RUN ninja -C out/Default/ :all | ||
RUN ./tools/build.py | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,4 @@ FROM maxmcd/deno:slim | |
|
||
COPY . . | ||
|
||
CMD deno main.ts | ||
CMD deno ./main.ts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1 @@ | ||
import * as deno from "deno"; | ||
|
||
|
||
deno.sub("echo", (ui8: Uint8Array) => { | ||
const str = String.fromCharCode.apply(null, ui8); | ||
console.log("Got message", str); | ||
}); | ||
|
||
function str2ui8(str: string): Uint8Array { | ||
const ui8 = new Uint8Array(str.length); | ||
for (let i = 0; i < str.length; i++) { | ||
ui8[i] = str.charCodeAt(i); | ||
} | ||
return ui8; | ||
} | ||
|
||
console.log("Before deno.pub()"); | ||
deno.pub("echo", str2ui8("hello")); | ||
console.log("After deno.pub()"); | ||
|
||
|
||
const data = deno.readFileSync("main.ts"); | ||
const decoder = new TextDecoder("utf-8"); | ||
const json = decoder.decode(data); | ||
console.log(json); | ||
console.log("Hello World"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
FROM maxmcd/deno:master as deno_from_scratch | ||
FROM debian:stretch-slim | ||
RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
ca-certificates | ||
WORKDIR /opt/ | ||
COPY --from=deno_from_scratch /opt/deno/out/debug/deno /usr/local/bin/ | ||
CMD ["deno"] |