View main.rs
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
use std::ffi::CString; | |
use std::mem::forget; | |
use wasmtime::{Instance, Module, Store}; | |
// | |
// Code of module which have to be compiled to wasm library | |
// | |
// use std::alloc::{alloc, Layout}; | |
// use std::ffi::CString; | |
// use std::mem::forget; |
View main.rs
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
use futures::future::BoxFuture; | |
#[tokio::main] | |
async fn main() { | |
let words = vec!["one", "two"]; | |
let result = add(words, |word| { | |
Box::pin(async { | |
let mut kw = word; | |
kw.push("three"); | |
kw |
View main.rs
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
#[allow(dead_code)] | |
#[derive(Debug, Copy, Clone)] | |
struct A<'text> { | |
foo: &'text str, | |
baz: i32, | |
} | |
fn ptr_to_struct(p: *const A) { | |
let b: A = unsafe { *p }; // main part of this example! | |
println!("{:#?}", b); |
View .vimspector.json
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
{ | |
"configurations": { | |
"run": { | |
"adapter": "vscode-node", | |
"configuration": { | |
"type": "node", | |
"request": "launch", | |
"name": "Jest Current File", | |
"program": "${workspaceFolder}/node_modules/.bin/jest", | |
"args": [ |
View machine.js
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
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
View xdebug.ini
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
error_log = /dev/stdout | |
log_errors = On | |
display_errors = On | |
display_startup_errors = On | |
error_reporting = -1 | |
xdebug.remote_enable = On | |
xdebug.remote_autostart = On | |
xdebug.remote_host = 192.168.137.111 #Your pc network address | |
xdebug.remote_port = 9001 |
View docker-compose.debug.yaml
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
version: "2" | |
services: | |
application: | |
image: php | |
environment: | |
— PHP_IDE_CONFIG=serverName=app.local #this is main part. And yes this is whitout quotation marks - it's requiring - wroted by blood :). |
View docker-stack.yml
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
version: "3.3" | |
volumes: | |
proxy: | |
networks: | |
proxy_network: | |
backend_network: #For connection another stacks to proxy. Should be created manualy. | |
external: true |