mirror of
https://github.com/denoland/deno
synced 2024-09-13 13:21:50 +00:00
cce3bd470b
* Added https import support. * Added deno.makeTempDirSync(). * Added deno.lstatSync() and deno.statSync().
15 lines
456 B
Rust
15 lines
456 B
Rust
// Copyright 2018 the Deno authors. All rights reserved. MIT license.
|
|
use binding;
|
|
use std::ffi::CStr;
|
|
|
|
// This is the source of truth for the Deno version. Ignore the value in Cargo.toml.
|
|
const DENO_VERSION: &str = "0.1.2";
|
|
|
|
pub fn print_version() {
|
|
let v = unsafe { binding::deno_v8_version() };
|
|
let c_str = unsafe { CStr::from_ptr(v) };
|
|
let version = c_str.to_str().unwrap();
|
|
println!("deno: {}", DENO_VERSION);
|
|
println!("v8: {}", version);
|
|
}
|