Skip to content

Instantly share code, notes, and snippets.

View ClickOnceProfile.pubxml.user.template.xml
<Project>
<PropertyGroup>
<InstallUrl>https://ctaggart.github.io/minesweeper-rs/</InstallUrl>
<ManifestCertificateThumbprint>1A92BF20220B301077205787F406B1BCEE6DA97E</ManifestCertificateThumbprint>
</PropertyGroup>
</Project>
View Cargo.toml
[package]
name = "cmdproxy"
version = "0.1.0"
authors = ["Cameron Taggart <cameron.taggart@gmail.com>"]
edition = "2018"
[dependencies]
# tokio = { version = "0.2", features = ["macros", "io-std", "io-util", "fs", "process"] }
tokio = { version = "0.2", features = ["full"] }
bytes = "*"
View http_help.rs
impl AsRef<OutgoingMessage> for ServerResponse {
fn as_ref(&self) -> &OutgoingMessage {
self.unchecked_ref()
}
}
impl From<ServerResponse> for OutgoingMessage {
fn from(child: ServerResponse) -> Self {
child.unchecked_into()
}
}
View lib.rs
mod logging;
use node::http::{create_server, IncomingMessage, RequestListener, ServerResponse};
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
pub fn run() {
// based on https://nodejs.org/en/docs/guides/getting-started-guide/
let default_port = 3000.;
let port = match node::PROCESS.env().get("PORT") {
View main.js
const { run } = require('./pkg/node_console_hello_world.js');
run(process.argv);
View lib.rs
mod logging;
use js_sys::Array;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
pub fn run(argv: &Array) {
node::CONSOLE.log_va0(argv);
let args: Vec<String> = argv.iter().flat_map(|v| v.as_string()).collect();
log!("args: {:?}", args);
View __bindgen.ii
namespace std { inline namespace __1 { } }
typedef __signed char int8_t;
typedef short int16_t;
typedef int int32_t;
typedef long long int64_t;
typedef unsigned char uint8_t;
typedef unsigned short uint16_t;
typedef unsigned int uint32_t;
typedef unsigned long long uint64_t;
typedef int8_t int_least8_t;
View run-c2rust.log
configure.ac:121: installing './compile'
configure.ac:8: installing './missing'
Makefile.am: installing './depcomp'
checking for pkg-config... /usr/local/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking build system type... x86_64-apple-darwin19.0.0
checking host system type... x86_64-apple-darwin19.0.0
checking whether to enable maintainer-specific portions of Makefiles... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
View copy_table.rs
use azure_sdk_storage_core::client::Client;
use azure_sdk_storage_table::table::TableService;
use std::error::Error;
use tokio_core::reactor::Core;
use futures::stream::Stream;
fn main() {
code().unwrap();
}
View create_blobs.rs
use azure_sdk_core::prelude::*;
use azure_sdk_storage_blob::prelude::*;
use azure_sdk_storage_core::prelude::*;
use futures::future::*;
use std::error::Error;
use tokio_core::reactor::Core;
fn main() {
code().unwrap();
}