mirror of
https://github.com/danog/ext-php-rs.git
synced 2024-12-11 16:49:53 +01:00
6df362b714
* started work on stub generator * Worked on stub CLI tool * Unused import * Account for namespaces in function and class names * Add support for docblocks on structs * Push Rust comments to stubs * Add indentation to stub generation * Add CLI application to install and generate stubs This time CLI application is defined on user side, called with `cargo run -- ..args..` * Export anyhow result * Add constants to stub file * Removed stub symbols No longer required as we are now building while also linking to PHP. Keeping the stubs causes the stubs to override the real symbols in the extension. * Fix stubs for real this time Removed stub symbols as they were being included in the extension dylib, fix by loading the PHP executable as a dylib, loading the required symbols globally. * Maybe actually fix stubs this time * Forgot to remove PHP binary loading * let's give this another go... cargo subcommand Now called via `cargo php <install,stubs>`. * Added `remove` command * Tidied up cargo-php, commented, set up CI * Fix return types with non-ident types * define namespace ordering * Fix tests, replace `Self` when in outer context * Moved allowed bindings into separate file * Update guide with CLI instructions
15 lines
485 B
Docker
15 lines
485 B
Docker
FROM php:zts
|
|
|
|
WORKDIR /tmp
|
|
|
|
RUN apt update -y && apt upgrade -y
|
|
RUN apt install lsb-release wget gnupg software-properties-common -y
|
|
RUN bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)"
|
|
|
|
ENV RUSTUP_HOME=/rust
|
|
ENV CARGO_HOME=/cargo
|
|
ENV PATH=/cargo/bin:/rust/bin:$PATH
|
|
|
|
RUN (curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain nightly --no-modify-path) && rustup default nightly
|
|
|
|
ENTRYPOINT [ "/cargo/bin/cargo", "build", "--all", "--release" ] |